diff options
Diffstat (limited to 'fs/coredump.c')
-rw-r--r-- | fs/coredump.c | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/fs/coredump.c b/fs/coredump.c index 18baf2c009d4..dc1f937413d5 100644 --- a/fs/coredump.c +++ b/fs/coredump.c @@ -728,3 +728,12 @@ int dump_skip(struct coredump_params *cprm, size_t nr) } } EXPORT_SYMBOL(dump_skip); + +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; +} +EXPORT_SYMBOL(dump_align); |