summaryrefslogtreecommitdiff
path: root/libbcachefs/alloc_background.h
diff options
context:
space:
mode:
authorKent Overstreet <kent.overstreet@linux.dev>2025-05-31 23:40:21 -0400
committerKent Overstreet <kent.overstreet@linux.dev>2025-05-31 23:40:21 -0400
commit3457fbde27c15b8937169ee30f1c097018fea024 (patch)
treece8d81e83e71c53c2bb99aa32e3235677e62d0f6 /libbcachefs/alloc_background.h
parent4613023c166e95bd37eef957a82080b2c7625d0d (diff)
Update bcachefs sources to d316ba08b045 bcachefs: Repair code for directory i_size
Diffstat (limited to 'libbcachefs/alloc_background.h')
-rw-r--r--libbcachefs/alloc_background.h6
1 files changed, 2 insertions, 4 deletions
diff --git a/libbcachefs/alloc_background.h b/libbcachefs/alloc_background.h
index b97ae710..0cc5adc5 100644
--- a/libbcachefs/alloc_background.h
+++ b/libbcachefs/alloc_background.h
@@ -13,11 +13,9 @@
static inline bool bch2_dev_bucket_exists(struct bch_fs *c, struct bpos pos)
{
- rcu_read_lock();
+ guard(rcu)();
struct bch_dev *ca = bch2_dev_rcu_noerror(c, pos.inode);
- bool ret = ca && bucket_valid(ca, pos.offset);
- rcu_read_unlock();
- return ret;
+ return ca && bucket_valid(ca, pos.offset);
}
static inline u64 bucket_to_u64(struct bpos bucket)