diff options
author | Kent Overstreet <kent.overstreet@linux.dev> | 2025-05-17 19:53:50 -0400 |
---|---|---|
committer | Kent Overstreet <kent.overstreet@linux.dev> | 2025-05-21 20:15:05 -0400 |
commit | 8c3fc7cca38459751489f5015f3282a64e452b7e (patch) | |
tree | 574d4480eb1ef40b92fa1c50786b17f1171c90de | |
parent | 6b86da9282b0f6a3fb7aae709dca9feb4c8316b5 (diff) |
bcachefs: fix bch2_debugfs_flush_buf() when tabstops are in use
Signed-off-by: Kent Overstreet <kent.overstreet@linux.dev>
-rw-r--r-- | fs/bcachefs/debug.c | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/fs/bcachefs/debug.c b/fs/bcachefs/debug.c index 4ee5d486b305..4fa70634c90e 100644 --- a/fs/bcachefs/debug.c +++ b/fs/bcachefs/debug.c @@ -320,6 +320,11 @@ ssize_t bch2_debugfs_flush_buf(struct dump_iter *i) i->buf.pos -= copied; memmove(i->buf.buf, i->buf.buf + copied, i->buf.pos); + if (i->buf.last_newline >= copied) + i->buf.last_newline -= copied; + if (i->buf.last_field >= copied) + i->buf.last_field -= copied; + if (copied != bytes) return -EFAULT; } |