projects
/
linux-2.6-microblaze.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
ee94c41
)
bcachefs: Fix bch2_btree_path_traverse_all()
author
Kent Overstreet
<kent.overstreet@linux.dev>
Sun, 8 Jan 2023 05:04:30 +0000
(
00:04
-0500)
committer
Kent Overstreet
<kent.overstreet@linux.dev>
Sun, 22 Oct 2023 21:09:49 +0000
(17:09 -0400)
We need to take a ref on a path while we're traversing it: this fixes a
bug with paths getting reused while being traversed, in the key cache
fill code.
Signed-off-by: Kent Overstreet <kent.overstreet@linux.dev>
fs/bcachefs/btree_iter.c
patch
|
blob
|
history
diff --git
a/fs/bcachefs/btree_iter.c
b/fs/bcachefs/btree_iter.c
index
398db0f
..
31733c2
100644
(file)
--- a/
fs/bcachefs/btree_iter.c
+++ b/
fs/bcachefs/btree_iter.c
@@
-999,7
+999,10
@@
retry_all:
* the same position:
*/
if (path->uptodate) {
+ __btree_path_get(path, false);
ret = btree_path_traverse_one(trans, path, 0, _THIS_IP_);
+ __btree_path_put(path, false);
+
if (bch2_err_matches(ret, BCH_ERR_transaction_restart) ||
ret == -ENOMEM)
goto retry_all;