bcachefs: push rcu lock down into bch2_target_to_mask()
authorBrian Foster <bfoster@redhat.com>
Tue, 30 May 2023 18:48:58 +0000 (14:48 -0400)
committerKent Overstreet <kent.overstreet@linux.dev>
Sun, 22 Oct 2023 21:10:03 +0000 (17:10 -0400)
commita1dd428b8bb78a03f210e18b05b0d73cac86fb7d
tree25847a81aafd3df4b662242dc11dfdb1e906ee4c
parentfec4fc82b531beb2cc67b734140ffe776af33f7c
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>
fs/bcachefs/alloc_foreground.c
fs/bcachefs/disk_groups.c