]> git.proxmox.com Git - mirror_ubuntu-focal-kernel.git/commitdiff
dump_align(): fix the dumb braino
authorAl Viro <viro@zeniv.linux.org.uk>
Sat, 16 Nov 2013 02:55:52 +0000 (21:55 -0500)
committerAl Viro <viro@zeniv.linux.org.uk>
Sat, 16 Nov 2013 03:04:09 +0000 (22:04 -0500)
Mea culpa - original variant used 64-by-32-bit division,
which got caught very late.  Getting rid of that wasn't
hard, but I'd managed to botch the calling conventions
in process ;-/

Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
fs/coredump.c

index 62406b6959b63389bd503cf6db4ea528266b79a8..a2856f7bb613b91c8691844f1781086ff31f5611 100644 (file)
@@ -733,7 +733,7 @@ int dump_align(struct coredump_params *cprm, int align)
 {
        unsigned mod = cprm->written & (align - 1);
        if (align & (align - 1))
-               return -EINVAL;
-       return mod ? dump_skip(cprm, align - mod) : 0;
+               return 0;
+       return mod ? dump_skip(cprm, align - mod) : 1;
 }
 EXPORT_SYMBOL(dump_align);