bcachefs: bch2_dev_get_ioref2(); backpointers.c
authorKent Overstreet <kent.overstreet@linux.dev>
Fri, 3 May 2024 16:44:07 +0000 (12:44 -0400)
committerKent Overstreet <kent.overstreet@linux.dev>
Thu, 9 May 2024 20:23:35 +0000 (16:23 -0400)
Signed-off-by: Kent Overstreet <kent.overstreet@linux.dev>
fs/bcachefs/backpointers.c

index 3f5333b4c3dee80cac3a802848e903f25cce0f16..9ac46f868bb45f555c280f588a53573879968107 100644 (file)
@@ -486,8 +486,8 @@ found:
 
        bytes = p.crc.compressed_size << 9;
 
-       struct bch_dev *ca = bch2_dev_bkey_exists(c, dev);
-       if (!bch2_dev_get_ioref(ca, READ))
+       struct bch_dev *ca = bch2_dev_get_ioref2(c, dev, READ);
+       if (!ca)
                return false;
 
        data_buf = kvmalloc(bytes, GFP_KERNEL);