projects
/
platform
/
kernel
/
linux-amlogic.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
6d12d7a
)
bcachefs: Fix infinite loop in propagate_key_to_snapshot_leaves()
author
Kent Overstreet
<kent.overstreet@linux.dev>
Mon, 23 Sep 2024 20:39:49 +0000
(16:39 -0400)
committer
Kent Overstreet
<kent.overstreet@linux.dev>
Mon, 23 Sep 2024 22:46:58 +0000
(18:46 -0400)
As we iterate we need to mark that we no longer need iterators -
otherwise we'll infinite loop via the "too many iters" check when
there's many snapshots.
Signed-off-by: Kent Overstreet <kent.overstreet@linux.dev>
fs/bcachefs/snapshot.c
patch
|
blob
|
history
diff --git
a/fs/bcachefs/snapshot.c
b/fs/bcachefs/snapshot.c
index dff83ebbd912c2183729683a41cbeba886a56cc2..1809442b00ee44699c9ca7f9b509ed3d3e01f7c2 100644
(file)
--- a/
fs/bcachefs/snapshot.c
+++ b/
fs/bcachefs/snapshot.c
@@
-1784,6
+1784,7
@@
static int bch2_propagate_key_to_snapshot_leaf(struct btree_trans *trans,
new->k.p.snapshot = leaf_id;
ret = bch2_trans_update(trans, &iter, new, 0);
out:
+ bch2_set_btree_iter_dontneed(&iter);
bch2_trans_iter_exit(trans, &iter);
return ret;
}