summaryrefslogtreecommitdiffstats
path: root/fs/bcachefs/journal_io.c
diff options
context:
space:
mode:
authorKent Overstreet <kent.overstreet@linux.dev>2025-05-24 16:33:39 -0400
committerKent Overstreet <kent.overstreet@linux.dev>2025-06-01 00:03:12 -0400
commit18dad454cd16cbb4c219dbd19a0008af52eb294a (patch)
tree8719893c0092c15af59b41afcbdb37e90ff6a602 /fs/bcachefs/journal_io.c
parentbcachefs: CLASS(btree_trans) (diff)
downloadlinux-18dad454cd16cbb4c219dbd19a0008af52eb294a.tar.gz
linux-18dad454cd16cbb4c219dbd19a0008af52eb294a.zip
bcachefs: Replace rcu_read_lock() with guards
The new guard(), scoped_guard() allow for more natural code. Some of the uses with creative flow control have been left. Signed-off-by: Kent Overstreet <kent.overstreet@linux.dev>
Diffstat (limited to 'fs/bcachefs/journal_io.c')
-rw-r--r--fs/bcachefs/journal_io.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/fs/bcachefs/journal_io.c b/fs/bcachefs/journal_io.c
index 52297057531b..8ce41753eadb 100644
--- a/fs/bcachefs/journal_io.c
+++ b/fs/bcachefs/journal_io.c
@@ -1521,7 +1521,7 @@ static void journal_advance_devs_to_next_bucket(struct journal *j,
{
struct bch_fs *c = container_of(j, struct bch_fs, journal);
- rcu_read_lock();
+ guard(rcu)();
darray_for_each(*devs, i) {
struct bch_dev *ca = rcu_dereference(c->devs[*i]);
if (!ca)
@@ -1543,7 +1543,6 @@ static void journal_advance_devs_to_next_bucket(struct journal *j,
ja->bucket_seq[ja->cur_idx] = le64_to_cpu(seq);
}
}
- rcu_read_unlock();
}
static void __journal_write_alloc(struct journal *j,