From a00839395103d5e2d132a6c4a9680256580ed3d1 Mon Sep 17 00:00:00 2001 From: Omar Sandoval Date: Wed, 11 May 2016 15:16:36 -0700 Subject: 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 Signed-off-by: Al Viro --- arch/powerpc/platforms/cell/spufs/coredump.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'arch/powerpc') 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); -- cgit