]> git.ipfire.org Git - thirdparty/kernel/linux.git/commitdiff
bcachefs: fix bp_pos_to_bucket_nodev_noerror
authorKent Overstreet <kent.overstreet@linux.dev>
Fri, 15 Nov 2024 03:49:40 +0000 (22:49 -0500)
committerKent Overstreet <kent.overstreet@linux.dev>
Sat, 21 Dec 2024 06:36:18 +0000 (01:36 -0500)
_noerror means don't produce inconsistent errors, so it should be using
bch2_dev_rcu_noerror().

Signed-off-by: Kent Overstreet <kent.overstreet@linux.dev>
fs/bcachefs/backpointers.h

index 74c96aee713e83c879284a243a42fc5a1af48471..eda3a78a5e2b9de7c5c23cfaac4bcd649dd84138 100644 (file)
@@ -46,7 +46,7 @@ static inline struct bpos bp_pos_to_bucket(const struct bch_dev *ca, struct bpos
 static inline bool bp_pos_to_bucket_nodev_noerror(struct bch_fs *c, struct bpos bp_pos, struct bpos *bucket)
 {
        rcu_read_lock();
-       struct bch_dev *ca = bch2_dev_rcu(c, bp_pos.inode);
+       struct bch_dev *ca = bch2_dev_rcu_noerror(c, bp_pos.inode);
        if (ca)
                *bucket = bp_pos_to_bucket(ca, bp_pos);
        rcu_read_unlock();