coredump: don't bother with do_truncate()
authorAl Viro <viro@zeniv.linux.org.uk>
Sun, 8 Mar 2020 13:16:37 +0000 (09:16 -0400)
committerAl Viro <viro@zeniv.linux.org.uk>
Mon, 8 Mar 2021 15:21:11 +0000 (10:21 -0500)
commitd0f1088b31db2d03497a74ca67755df5515f8ff4
tree8252b8cb97ae2041ea26a72490dd94466a936758
parenta38fd8748464831584a19438cbb3082b5a2dab15
coredump: don't bother with do_truncate()

have dump_skip() just remember how much needs to be skipped,
leave actual seeks/writing zeroes to the next dump_emit()
or the end of coredump output, whichever comes first.
And instead of playing with do_truncate() in the end, just
write one NUL at the end of the last gap (if any).

Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
arch/powerpc/platforms/cell/spufs/coredump.c
fs/binfmt_elf.c
fs/binfmt_elf_fdpic.c
fs/coredump.c
include/linux/binfmts.h
include/linux/coredump.h