summaryrefslogtreecommitdiff
path: root/fs/coredump.c
diff options
context:
space:
mode:
authorAl Viro <viro@zeniv.linux.org.uk>2016-06-30 23:30:06 -0400
committerAl Viro <viro@zeniv.linux.org.uk>2016-06-30 23:30:06 -0400
commitc074cefcc0f75152bc74a1c4f2e7b662f09403d4 (patch)
tree5b323c1c83ecfb7a2de95b26969adc7cb5d8d507 /fs/coredump.c
parentea7d4c046ba6e2c6135c98721f4f09efd1adaabc (diff)
parente06b933e6ded42384164d28a2060b7f89243b895 (diff)
Merge branch 'for-linus' into work.misc
Diffstat (limited to 'fs/coredump.c')
-rw-r--r--fs/coredump.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/fs/coredump.c b/fs/coredump.c
index 38a7ab87e10a..281b768000e6 100644
--- a/fs/coredump.c
+++ b/fs/coredump.c
@@ -794,6 +794,7 @@ int dump_emit(struct coredump_params *cprm, const void *addr, int nr)
return 0;
file->f_pos = pos;
cprm->written += n;
+ cprm->pos += n;
nr -= n;
}
return 1;
@@ -808,6 +809,7 @@ int dump_skip(struct coredump_params *cprm, size_t nr)
if (dump_interrupted() ||
file->f_op->llseek(file, nr, SEEK_CUR) < 0)
return 0;
+ cprm->pos += nr;
return 1;
} else {
while (nr > PAGE_SIZE) {
@@ -822,7 +824,7 @@ EXPORT_SYMBOL(dump_skip);
int dump_align(struct coredump_params *cprm, int align)
{
- unsigned mod = cprm->file->f_pos & (align - 1);
+ unsigned mod = cprm->pos & (align - 1);
if (align & (align - 1))
return 0;
return mod ? dump_skip(cprm, align - mod) : 1;