summaryrefslogtreecommitdiff
path: root/fs/bcachefs/alloc_background.h
diff options
context:
space:
mode:
authorKent Overstreet <kent.overstreet@linux.dev>2024-09-02 01:12:26 +0300
committerKent Overstreet <kent.overstreet@linux.dev>2024-09-21 18:39:48 +0300
commit805ddc204287e74ebd2640c0f088e04f94e98b48 (patch)
tree9c10193e84cba7da633ad0434fb4e57948577767 /fs/bcachefs/alloc_background.h
parentb99a94fd7ae91951d4f96b39e6ff50ac2fa8decb (diff)
downloadlinux-805ddc204287e74ebd2640c0f088e04f94e98b48.tar.xz
bcachefs: bch2_dev_rcu_noerror()
bch2_dev_rcu() now properly errors if the device is invalid Signed-off-by: Kent Overstreet <kent.overstreet@linux.dev>
Diffstat (limited to 'fs/bcachefs/alloc_background.h')
-rw-r--r--fs/bcachefs/alloc_background.h2
1 files changed, 1 insertions, 1 deletions
diff --git a/fs/bcachefs/alloc_background.h b/fs/bcachefs/alloc_background.h
index 577f823a0207..f8e87c6721b1 100644
--- a/fs/bcachefs/alloc_background.h
+++ b/fs/bcachefs/alloc_background.h
@@ -16,7 +16,7 @@ enum bch_validate_flags;
static inline bool bch2_dev_bucket_exists(struct bch_fs *c, struct bpos pos)
{
rcu_read_lock();
- struct bch_dev *ca = bch2_dev_rcu(c, pos.inode);
+ struct bch_dev *ca = bch2_dev_rcu_noerror(c, pos.inode);
bool ret = ca && bucket_valid(ca, pos.offset);
rcu_read_unlock();
return ret;