Skip to content

Commit

Permalink
dump_align(): fix the dumb braino
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Al Viro committed Nov 16, 2013
1 parent 049ffa8 commit db51242
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions fs/coredump.c
Original file line number Diff line number Diff line change
Expand Up @@ -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);

0 comments on commit db51242

Please sign in to comment.