diff options
author | Al Viro <viro@zeniv.linux.org.uk> | 2020-03-08 16:16:37 +0300 |
---|---|---|
committer | Al Viro <viro@zeniv.linux.org.uk> | 2021-03-08 18:21:11 +0300 |
commit | d0f1088b31db2d03497a74ca67755df5515f8ff4 (patch) | |
tree | 8252b8cb97ae2041ea26a72490dd94466a936758 /include/linux/coredump.h | |
parent | a38fd8748464831584a19438cbb3082b5a2dab15 (diff) | |
download | linux-d0f1088b31db2d03497a74ca67755df5515f8ff4.tar.xz |
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>
Diffstat (limited to 'include/linux/coredump.h')
-rw-r--r-- | include/linux/coredump.h | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/include/linux/coredump.h b/include/linux/coredump.h index e58e8c207782..247aae4e69c8 100644 --- a/include/linux/coredump.h +++ b/include/linux/coredump.h @@ -18,10 +18,10 @@ struct core_vma_metadata { * functions to write out all the necessary info. */ struct coredump_params; -extern int dump_skip(struct coredump_params *cprm, size_t nr); +extern void dump_skip_to(struct coredump_params *cprm, unsigned long to); +extern void dump_skip(struct coredump_params *cprm, size_t nr); extern int dump_emit(struct coredump_params *cprm, const void *addr, int nr); extern int dump_align(struct coredump_params *cprm, int align); -extern void dump_truncate(struct coredump_params *cprm); int dump_user_range(struct coredump_params *cprm, unsigned long start, unsigned long len); int dump_vma_snapshot(struct coredump_params *cprm, int *vma_count, |