From: Al Viro Date: Sat, 16 Nov 2013 02:55:52 +0000 (-0500) Subject: dump_align(): fix the dumb braino X-Git-Tag: v3.13-rc1~26^2~6 X-Git-Url: https://asedeno.scripts.mit.edu/gitweb/?a=commitdiff_plain;h=db51242d89b3059a46a3cf2f3339f8cd975cb954;p=linux.git dump_align(): fix the dumb braino 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 --- diff --git a/fs/coredump.c b/fs/coredump.c index 62406b6959b6..a2856f7bb613 100644 --- a/fs/coredump.c +++ b/fs/coredump.c @@ -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);