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:
3b80552
)
bcachefs: Fix bch2_have_enough_devs() for BCH_SB_MEMBER_INVALID
author
Kent Overstreet
<kent.overstreet@linux.dev>
Sat, 12 Oct 2024 02:00:44 +0000
(22:00 -0400)
committer
Kent Overstreet
<kent.overstreet@linux.dev>
Sat, 12 Oct 2024 02:20:51 +0000
(22:20 -0400)
This fixes a kasan splat in the ec device removal tests.
Signed-off-by: Kent Overstreet <kent.overstreet@linux.dev>
fs/bcachefs/replicas.c
patch
|
blob
|
history
diff --git
a/fs/bcachefs/replicas.c
b/fs/bcachefs/replicas.c
index
797da10
..
477ef09
100644
(file)
--- a/
fs/bcachefs/replicas.c
+++ b/
fs/bcachefs/replicas.c
@@
-821,6
+821,11
@@
bool bch2_have_enough_devs(struct bch_fs *c, struct bch_devs_mask devs,
rcu_read_lock();
for (unsigned i = 0; i < e->nr_devs; i++) {
+ if (e->devs[i] == BCH_SB_MEMBER_INVALID) {
+ nr_failed++;
+ continue;
+ }
+
nr_online += test_bit(e->devs[i], devs.d);
struct bch_dev *ca = bch2_dev_rcu_noerror(c, e->devs[i]);