projects
/
linux.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
06ed855
)
bcachefs: add missing bch2_trans_begin() call
author
Kent Overstreet
<kent.overstreet@gmail.com>
Tue, 23 Jul 2019 22:56:28 +0000
(18:56 -0400)
committer
Kent Overstreet
<kent.overstreet@linux.dev>
Sun, 22 Oct 2023 21:08:24 +0000
(17:08 -0400)
for_each_btree_key() calls bch2_trans_get_iter() - we have to reset the
transaction state before getting the iterator again, in the retry path
Signed-off-by: Kent Overstreet <kent.overstreet@linux.dev>
fs/bcachefs/io.c
patch
|
blob
|
history
diff --git
a/fs/bcachefs/io.c
b/fs/bcachefs/io.c
index 8f16e252d2f1cbf082cf5ab23d167e061d573b6b..a539719661b859cd2d4ecea4beebf4ae32a05d8d 100644
(file)
--- a/
fs/bcachefs/io.c
+++ b/
fs/bcachefs/io.c
@@
-1263,11
+1263,13
@@
static void bch2_read_retry(struct bch_fs *c, struct bch_read_bio *rbio,
struct bkey_s_c k;
int ret;
- bch2_trans_init(&trans, c, 0, 0);
-
flags &= ~BCH_READ_LAST_FRAGMENT;
flags |= BCH_READ_MUST_CLONE;
+
+ bch2_trans_init(&trans, c, 0, 0);
retry:
+ bch2_trans_begin(&trans);
+
for_each_btree_key(&trans, iter, BTREE_ID_EXTENTS,
POS(inode, bvec_iter.bi_sector),
BTREE_ITER_SLOTS, k, ret) {