diff options
author | Kent Overstreet <kent.overstreet@gmail.com> | 2021-06-14 18:16:10 -0400 |
---|---|---|
committer | Kent Overstreet <kent.overstreet@linux.dev> | 2023-10-22 17:09:06 -0400 |
commit | 8c3f6da9fc526e7ba0f6449efa1040084406e9ba (patch) | |
tree | 6106b0097c188e1acb746de16468c28f095aad40 /fs/bcachefs/extent_update.c | |
parent | b89726ab86aab15ea8526fb365da6a0f5d474241 (diff) | |
download | lwn-8c3f6da9fc526e7ba0f6449efa1040084406e9ba.tar.gz lwn-8c3f6da9fc526e7ba0f6449efa1040084406e9ba.zip |
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/extent_update.c')
-rw-r--r-- | fs/bcachefs/extent_update.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/fs/bcachefs/extent_update.c b/fs/bcachefs/extent_update.c index ef4aaf1c30ed..4a8dd085f7fb 100644 --- a/fs/bcachefs/extent_update.c +++ b/fs/bcachefs/extent_update.c @@ -104,6 +104,10 @@ int bch2_extent_atomic_end(struct btree_iter *iter, unsigned nr_iters = 0; int ret; + ret = bch2_btree_iter_traverse(iter); + if (ret) + return ret; + *end = insert->k.p; /* extent_update_to_keys(): */ |