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>
This commit is contained in:
Al Viro
2020-03-08 09:16:37 -04:00
parent a38fd87484
commit d0f1088b31
6 changed files with 49 additions and 38 deletions

View File

@@ -86,6 +86,7 @@ struct coredump_params {
unsigned long mm_flags;
loff_t written;
loff_t pos;
loff_t to_skip;
};
/*