diff options
author | Al Viro <viro@zeniv.linux.org.uk> | 2020-03-08 14:16:37 +0100 |
---|---|---|
committer | Al Viro <viro@zeniv.linux.org.uk> | 2021-03-08 16:21:11 +0100 |
commit | d0f1088b31db2d03497a74ca67755df5515f8ff4 (patch) | |
tree | 8252b8cb97ae2041ea26a72490dd94466a936758 /arch/powerpc | |
parent | Linux 5.12-rc2 (diff) | |
download | linux-d0f1088b31db2d03497a74ca67755df5515f8ff4.tar.xz linux-d0f1088b31db2d03497a74ca67755df5515f8ff4.zip |
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 'arch/powerpc')
-rw-r--r-- | arch/powerpc/platforms/cell/spufs/coredump.c | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/arch/powerpc/platforms/cell/spufs/coredump.c b/arch/powerpc/platforms/cell/spufs/coredump.c index 60b5583e9eaf..1a587618015c 100644 --- a/arch/powerpc/platforms/cell/spufs/coredump.c +++ b/arch/powerpc/platforms/cell/spufs/coredump.c @@ -149,8 +149,7 @@ static int spufs_arch_write_note(struct spu_context *ctx, int i, return -EIO; } - if (!dump_skip(cprm, roundup(cprm->pos - ret + sz, 4) - cprm->pos)) - return -EIO; + dump_skip_to(cprm, roundup(cprm->pos - ret + sz, 4)); return 0; } |