diff options
author | Kent Overstreet <kent.overstreet@gmail.com> | 2021-06-15 01:16:10 +0300 |
---|---|---|
committer | Kent Overstreet <kent.overstreet@linux.dev> | 2023-10-23 00:09:06 +0300 |
commit | 8c3f6da9fc526e7ba0f6449efa1040084406e9ba (patch) | |
tree | 6106b0097c188e1acb746de16468c28f095aad40 /fs/bcachefs/fs-io.c | |
parent | b89726ab86aab15ea8526fb365da6a0f5d474241 (diff) | |
download | linux-8c3f6da9fc526e7ba0f6449efa1040084406e9ba.tar.xz |
bcachefs: Improve iter->should_be_locked
Adding iter->should_be_locked introduced a regression where it ended up
not being set on the iterator passed to bch2_btree_update_start(), which
is definitely not what we want.
This patch requires it to be set when calling bch2_trans_update(), and
adds various fixups to make that happen.
Signed-off-by: Kent Overstreet <kent.overstreet@gmail.com>
Diffstat (limited to 'fs/bcachefs/fs-io.c')
-rw-r--r-- | fs/bcachefs/fs-io.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/fs/bcachefs/fs-io.c b/fs/bcachefs/fs-io.c index e39e22581e4b..0ffc3971d1b2 100644 --- a/fs/bcachefs/fs-io.c +++ b/fs/bcachefs/fs-io.c @@ -2611,7 +2611,8 @@ reassemble: BUG_ON(ret); } - ret = bch2_trans_update(&trans, del, &delete, trigger_flags) ?: + ret = bch2_btree_iter_traverse(del) ?: + bch2_trans_update(&trans, del, &delete, trigger_flags) ?: bch2_trans_update(&trans, dst, copy.k, trigger_flags) ?: bch2_trans_commit(&trans, &disk_res, &inode->ei_journal_seq, |