summaryrefslogtreecommitdiff
path: root/libbcachefs/disk_groups.c
diff options
context:
space:
mode:
authorKent Overstreet <kent.overstreet@linux.dev>2025-05-04 15:38:06 -0400
committerKent Overstreet <kent.overstreet@linux.dev>2025-05-04 15:52:42 -0400
commit401a20ed984b7ccee689202d9372045d41271bcc (patch)
tree61a8553d25b04459593fca2c350dfcb7def76150 /libbcachefs/disk_groups.c
parent6e4bda5ad5f7a43b90d9f22b8e86011e51569bf1 (diff)
Update bcachefs sources to b4927db2cdc7 bcachefs: bcachefs_metadata_version_fast_device_removal
Signed-off-by: Kent Overstreet <kent.overstreet@linux.dev>
Diffstat (limited to 'libbcachefs/disk_groups.c')
-rw-r--r--libbcachefs/disk_groups.c6
1 files changed, 1 insertions, 5 deletions
diff --git a/libbcachefs/disk_groups.c b/libbcachefs/disk_groups.c
index c1a2a957..c20ecf5e 100644
--- a/libbcachefs/disk_groups.c
+++ b/libbcachefs/disk_groups.c
@@ -212,17 +212,13 @@ bool bch2_dev_in_target(struct bch_fs *c, unsigned dev, unsigned target)
case TARGET_DEV:
return dev == t.dev;
case TARGET_GROUP: {
- rcu_read_lock();
struct bch_disk_groups_cpu *g = rcu_dereference(c->disk_groups);
const struct bch_devs_mask *m =
g && t.group < g->nr && !g->entries[t.group].deleted
? &g->entries[t.group].devs
: NULL;
- bool ret = m ? test_bit(dev, m->d) : false;
- rcu_read_unlock();
-
- return ret;
+ return m ? test_bit(dev, m->d) : false;
}
default:
BUG();