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>
This commit is contained in:
@@ -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);
|
||||
|
Reference in New Issue
Block a user