diff options
author | Brian Foster <bfoster@redhat.com> | 2023-05-30 20:48:58 +0200 |
---|---|---|
committer | Kent Overstreet <kent.overstreet@linux.dev> | 2023-10-22 23:10:03 +0200 |
commit | a1dd428b8bb78a03f210e18b05b0d73cac86fb7d (patch) | |
tree | 25847a81aafd3df4b662242dc11dfdb1e906ee4c /fs/bcachefs/alloc_foreground.c | |
parent | bcachefs: create internal disk_groups sysfs file (diff) | |
download | linux-a1dd428b8bb78a03f210e18b05b0d73cac86fb7d.tar.xz linux-a1dd428b8bb78a03f210e18b05b0d73cac86fb7d.zip |
bcachefs: push rcu lock down into bch2_target_to_mask()
We have one caller that cycles the rcu lock solely for this call
(via target_rw_devs()), and we'd like to add another. Simplify
things by pushing the rcu lock down into bch2_target_to_mask(),
similar to how bch2_dev_in_target() works.
Signed-off-by: Brian Foster <bfoster@redhat.com>
Signed-off-by: Kent Overstreet <kent.overstreet@linux.dev>
Diffstat (limited to 'fs/bcachefs/alloc_foreground.c')
-rw-r--r-- | fs/bcachefs/alloc_foreground.c | 2 |
1 files changed, 0 insertions, 2 deletions
diff --git a/fs/bcachefs/alloc_foreground.c b/fs/bcachefs/alloc_foreground.c index ec77601ebd0c..a7e6852271d2 100644 --- a/fs/bcachefs/alloc_foreground.c +++ b/fs/bcachefs/alloc_foreground.c @@ -934,9 +934,7 @@ static int __open_bucket_add_buckets(struct btree_trans *trans, unsigned i; int ret; - rcu_read_lock(); devs = target_rw_devs(c, wp->data_type, target); - rcu_read_unlock(); /* Don't allocate from devices we already have pointers to: */ for (i = 0; i < devs_have->nr; i++) |