提交 db51242d 编写于 作者: A Al Viro

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: NAl Viro <viro@zeniv.linux.org.uk>
上级 049ffa8a
...@@ -733,7 +733,7 @@ int dump_align(struct coredump_params *cprm, int align) ...@@ -733,7 +733,7 @@ int dump_align(struct coredump_params *cprm, int align)
{ {
unsigned mod = cprm->written & (align - 1); unsigned mod = cprm->written & (align - 1);
if (align & (align - 1)) if (align & (align - 1))
return -EINVAL; return 0;
return mod ? dump_skip(cprm, align - mod) : 0; return mod ? dump_skip(cprm, align - mod) : 1;
} }
EXPORT_SYMBOL(dump_align); EXPORT_SYMBOL(dump_align);
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册