aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorTomohiro Kusumi <[email protected]>2019-07-18 01:07:53 +0900
committerBrian Behlendorf <[email protected]>2019-07-17 09:07:53 -0700
commitc8802ba08d50483ca583f54dbe730e8ada922dd0 (patch)
treea00b084b3870cf7bd6e8cb84b21c01fe2bbce048
parent8062b7686aa2c3a22824b9a7c83cf01a5fa457a0 (diff)
Use zfsctl_snapshot_hold() wrapper
zfs_refcount_*() are to be wrapped by zfsctl_snapshot_*() in this file. Reviewed-by: Brian Behlendorf <[email protected]> Reviewed-by: Tony Hutter <[email protected]> Signed-off-by: Tomohiro Kusumi <[email protected]> Closes #9039
-rw-r--r--module/zfs/zfs_ctldir.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/module/zfs/zfs_ctldir.c b/module/zfs/zfs_ctldir.c
index 52314f4e1..8acbbb61c 100644
--- a/module/zfs/zfs_ctldir.c
+++ b/module/zfs/zfs_ctldir.c
@@ -192,7 +192,7 @@ static void
zfsctl_snapshot_add(zfs_snapentry_t *se)
{
ASSERT(RW_WRITE_HELD(&zfs_snapshot_lock));
- zfs_refcount_add(&se->se_refcount, NULL);
+ zfsctl_snapshot_hold(se);
avl_add(&zfs_snapshots_by_name, se);
avl_add(&zfs_snapshots_by_objsetid, se);
}
@@ -269,7 +269,7 @@ zfsctl_snapshot_find_by_name(char *snapname)
search.se_name = snapname;
se = avl_find(&zfs_snapshots_by_name, &search, NULL);
if (se)
- zfs_refcount_add(&se->se_refcount, NULL);
+ zfsctl_snapshot_hold(se);
return (se);
}
@@ -290,7 +290,7 @@ zfsctl_snapshot_find_by_objsetid(spa_t *spa, uint64_t objsetid)
search.se_objsetid = objsetid;
se = avl_find(&zfs_snapshots_by_objsetid, &search, NULL);
if (se)
- zfs_refcount_add(&se->se_refcount, NULL);
+ zfsctl_snapshot_hold(se);
return (se);
}