summaryrefslogtreecommitdiffstats
path: root/fs/bcachefs/ec.c
diff options
context:
space:
mode:
authorKent Overstreet <kent.overstreet@linux.dev>2023-11-02 19:37:15 -0400
committerKent Overstreet <kent.overstreet@linux.dev>2024-01-01 11:47:39 -0500
commit183bcc89b855c412bfefa545b799006d66f689a6 (patch)
tree5f639310d3f967cc5f938d56f2a0f59382f07210 /fs/bcachefs/ec.c
parentcf5bacb6a5213cd7f59c1dbf11531ff96445027a (diff)
downloadlinux-183bcc89b855c412bfefa545b799006d66f689a6.tar.gz
linux-183bcc89b855c412bfefa545b799006d66f689a6.tar.bz2
linux-183bcc89b855c412bfefa545b799006d66f689a6.zip
bcachefs: Clean up btree write buffer write ref handling
__bch2_btree_write_buffer_flush() now assumes a write ref is already held (as called by the transaction commit path); and the wrappers bch2_write_buffer_flush() and flush_sync() take an explicit write ref. This means internally the write buffer code can always use BTREE_INSERT_NOCHECK_RW, instead of in the previous code passing flags around and hoping the NOCHECK_RW flag was always carried around correctly. Signed-off-by: Kent Overstreet <kent.overstreet@linux.dev>
Diffstat (limited to 'fs/bcachefs/ec.c')
-rw-r--r--fs/bcachefs/ec.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/fs/bcachefs/ec.c b/fs/bcachefs/ec.c
index 24ec634077a3..bc8b556f19a9 100644
--- a/fs/bcachefs/ec.c
+++ b/fs/bcachefs/ec.c
@@ -1005,7 +1005,7 @@ static int ec_stripe_update_extents(struct bch_fs *c, struct ec_stripe_buf *s)
unsigned i, nr_data = v->nr_blocks - v->nr_redundant;
int ret = 0;
- ret = bch2_btree_write_buffer_flush(trans);
+ ret = bch2_btree_write_buffer_flush_nocheck_rw(trans);
if (ret)
goto err;