summaryrefslogtreecommitdiff
path: root/fs/bcachefs/compress.c
diff options
context:
space:
mode:
authorKent Overstreet <kent.overstreet@linux.dev>2025-03-20 10:25:15 -0400
committerKent Overstreet <kent.overstreet@linux.dev>2025-03-24 09:50:36 -0400
commit2fe208303a114012d7ca035dcb37edcee93b64f6 (patch)
tree7a52aa887cd7053f090aec344cbf1454b6772fb9 /fs/bcachefs/compress.c
parentaf2ff37da7ad6aabb79f57c9f7331600bd2b982d (diff)
bcachefs: Simplify bch2_write_op_error()
There's no reason for the caller to do the actual logging, it's all done the same. Signed-off-by: Kent Overstreet <kent.overstreet@linux.dev>
Diffstat (limited to 'fs/bcachefs/compress.c')
-rw-r--r--fs/bcachefs/compress.c15
1 files changed, 3 insertions, 12 deletions
diff --git a/fs/bcachefs/compress.c b/fs/bcachefs/compress.c
index 31467f77930f..91483f83eb59 100644
--- a/fs/bcachefs/compress.c
+++ b/fs/bcachefs/compress.c
@@ -270,24 +270,15 @@ int bch2_bio_uncompress_inplace(struct bch_write_op *op,
if (crc->uncompressed_size << 9 > c->opts.encoded_extent_max ||
crc->compressed_size << 9 > c->opts.encoded_extent_max) {
- struct printbuf buf = PRINTBUF;
- bch2_write_op_error(&buf, op, op->pos.offset,
- "extent too big to decompress");
- bch_err_ratelimited(c, "%s", buf.buf);
- printbuf_exit(&buf);
+ bch2_write_op_error(op, op->pos.offset, "extent too big to decompress");
return -EIO;
}
data = __bounce_alloc(c, dst_len, WRITE);
if (__bio_uncompress(c, bio, data.b, *crc)) {
- if (!c->opts.no_data_io) {
- struct printbuf buf = PRINTBUF;
- bch2_write_op_error(&buf, op, op->pos.offset,
- "decompression error");
- bch_err_ratelimited(c, "%s", buf.buf);
- printbuf_exit(&buf);
- }
+ if (!c->opts.no_data_io)
+ bch2_write_op_error(op, op->pos.offset, "decompression error");
ret = -EIO;
goto err;
}