From cdc3d5627d5f7c4e6b6372b9fb39cba0fe6a9b2a Mon Sep 17 00:00:00 2001 From: Al Viro Date: Sat, 5 Oct 2013 22:24:29 -0400 Subject: switch elf_coredump_extra_notes_write() to dump_emit() Signed-off-by: Al Viro --- fs/binfmt_elf.c | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) (limited to 'fs/binfmt_elf.c') diff --git a/fs/binfmt_elf.c b/fs/binfmt_elf.c index ddab40d..3bf75d7 100644 --- a/fs/binfmt_elf.c +++ b/fs/binfmt_elf.c @@ -2037,7 +2037,7 @@ static int elf_core_dump(struct coredump_params *cprm) size_t size = 0; struct vm_area_struct *vma, *gate_vma; struct elfhdr *elf = NULL; - loff_t offset = 0, dataoff, foffset; + loff_t offset = 0, dataoff; struct elf_note_info info = { }; struct elf_phdr *phdr4note = NULL; struct elf_shdr *shdr4extnum = NULL; @@ -2160,12 +2160,11 @@ static int elf_core_dump(struct coredump_params *cprm) if (!write_note_info(&info, cprm)) goto end_coredump; - foffset = cprm->written; - if (elf_coredump_extra_notes_write(cprm->file, &foffset)) + if (elf_coredump_extra_notes_write(cprm)) goto end_coredump; /* Align to page */ - if (!dump_seek(cprm->file, dataoff - foffset)) + if (!dump_seek(cprm->file, dataoff - cprm->written)) goto end_coredump; cprm->written = size; -- cgit v1.1