summaryrefslogtreecommitdiff
path: root/fs/bcachefs/io_write.c
diff options
context:
space:
mode:
authorKent Overstreet <kent.overstreet@linux.dev>2024-05-01 10:59:45 +0300
committerKent Overstreet <kent.overstreet@linux.dev>2024-05-09 00:29:24 +0300
commitd8585a79bebcfb3315f23c955e36ab8d8a7749d5 (patch)
tree5a3f21fd6f60e7144865ffe07bfb0ad23e97ad83 /fs/bcachefs/io_write.c
parent222eacabc17f360ede4efddda50534f828228ed0 (diff)
downloadlinux-d8585a79bebcfb3315f23c955e36ab8d8a7749d5.tar.xz
bcachefs: bch2_dev_have_ref()
bch2_dev_bkey_exists() is going away; bch2_dev_have_ref() documents that we're looking up a device without checking if it's present because we have a reference to it already. Signed-off-by: Kent Overstreet <kent.overstreet@linux.dev>
Diffstat (limited to 'fs/bcachefs/io_write.c')
-rw-r--r--fs/bcachefs/io_write.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/fs/bcachefs/io_write.c b/fs/bcachefs/io_write.c
index 285e1a23bde5..33202b77f6cf 100644
--- a/fs/bcachefs/io_write.c
+++ b/fs/bcachefs/io_write.c
@@ -1303,7 +1303,7 @@ retry:
bch2_cut_back(POS(op->pos.inode, op->pos.offset + bio_sectors(bio)), op->insert_keys.top);
darray_for_each(buckets, i) {
- struct bch_dev *ca = bch2_dev_bkey_exists(c, i->b.inode);
+ struct bch_dev *ca = bch2_dev_have_ref(c, i->b.inode);
__bch2_bucket_nocow_lock(&c->nocow_locks, i->l,
bucket_to_u64(i->b),
@@ -1380,7 +1380,7 @@ err:
return;
err_get_ioref:
darray_for_each(buckets, i)
- percpu_ref_put(&bch2_dev_bkey_exists(c, i->b.inode)->io_ref);
+ percpu_ref_put(&bch2_dev_have_ref(c, i->b.inode)->io_ref);
/* Fall back to COW path: */
goto out;