summaryrefslogtreecommitdiff
path: root/fs/bcachefs/disk_groups.c
diff options
context:
space:
mode:
authorKent Overstreet <kent.overstreet@linux.dev>2024-05-03 17:39:16 -0400
committerKent Overstreet <kent.overstreet@linux.dev>2024-05-08 17:29:22 -0400
commitf295298b8c6413f0ed2a5a69dd7f32409cc54f1d (patch)
treea3266d3a851dad863746331a28400a86205331c2 /fs/bcachefs/disk_groups.c
parente98786ea855cb28176e27ffce23fb163a36ed32e (diff)
bcachefs: New helpers for device refcounts
This will be used in the next patch for adding some new debug mode asserts. Signed-off-by: Kent Overstreet <kent.overstreet@linux.dev>
Diffstat (limited to 'fs/bcachefs/disk_groups.c')
-rw-r--r--fs/bcachefs/disk_groups.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/fs/bcachefs/disk_groups.c b/fs/bcachefs/disk_groups.c
index 04b6aa414476..1cb563dfa017 100644
--- a/fs/bcachefs/disk_groups.c
+++ b/fs/bcachefs/disk_groups.c
@@ -523,7 +523,7 @@ int bch2_opt_target_parse(struct bch_fs *c, const char *val, u64 *res,
ca = bch2_dev_lookup(c, val);
if (!IS_ERR(ca)) {
*res = dev_to_target(ca->dev_idx);
- percpu_ref_put(&ca->ref);
+ bch2_dev_put(ca);
return 0;
}