Skip to content

Commit db51242

Browse files
author
Al Viro
committed
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 <viro@zeniv.linux.org.uk>
1 parent 049ffa8 commit db51242

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

‎fs/coredump.c‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -733,7 +733,7 @@ int dump_align(struct coredump_params *cprm, int align)
733733
{
734734
unsigned mod = cprm->written & (align - 1);
735735
if (align & (align - 1))
736-
return -EINVAL;
737-
return mod ? dump_skip(cprm, align - mod) : 0;
736+
return 0;
737+
return mod ? dump_skip(cprm, align - mod) : 1;
738738
}
739739
EXPORT_SYMBOL(dump_align);

0 commit comments

Comments
 (0)