summaryrefslogtreecommitdiffstats
path: root/arch/powerpc/platforms/cell
diff options
context:
space:
mode:
authorOmar Sandoval <osandov@fb.com>2016-05-11 15:16:36 -0700
committerAl Viro <viro@zeniv.linux.org.uk>2016-05-12 16:55:50 -0400
commita00839395103d5e2d132a6c4a9680256580ed3d1 (patch)
treef45b3fdcdfcf65d722d3cf083527f876ebd1ea0d /arch/powerpc/platforms/cell
parent88ae4ab9802eaa8e400e611f85883143d89d6b61 (diff)
downloadlinux-stable-a00839395103d5e2d132a6c4a9680256580ed3d1.tar.gz
linux-stable-a00839395103d5e2d132a6c4a9680256580ed3d1.tar.bz2
linux-stable-a00839395103d5e2d132a6c4a9680256580ed3d1.zip
coredump: get rid of coredump_params->written
cprm->written is redundant with cprm->file->f_pos, so use that instead. Signed-off-by: Omar Sandoval <osandov@fb.com> Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
Diffstat (limited to 'arch/powerpc/platforms/cell')
-rw-r--r--arch/powerpc/platforms/cell/spufs/coredump.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/arch/powerpc/platforms/cell/spufs/coredump.c b/arch/powerpc/platforms/cell/spufs/coredump.c
index be6212ddbf06..84fb984f29c1 100644
--- a/arch/powerpc/platforms/cell/spufs/coredump.c
+++ b/arch/powerpc/platforms/cell/spufs/coredump.c
@@ -137,6 +137,7 @@ static int spufs_arch_write_note(struct spu_context *ctx, int i,
char *name;
char fullname[80], *buf;
struct elf_note en;
+ size_t skip;
buf = (void *)get_zeroed_page(GFP_KERNEL);
if (!buf)
@@ -171,8 +172,8 @@ static int spufs_arch_write_note(struct spu_context *ctx, int i,
if (rc < 0)
goto out;
- if (!dump_skip(cprm,
- roundup(cprm->written - total + sz, 4) - cprm->written))
+ skip = roundup(cprm->file->f_pos - total + sz, 4) - cprm->file->f_pos;
+ if (!dump_skip(cprm, skip))
goto Eio;
out:
free_page((unsigned long)buf);