summaryrefslogtreecommitdiffstats
path: root/module
diff options
context:
space:
mode:
authorMatthew Macy <[email protected]>2020-11-10 10:37:10 -0800
committerGitHub <[email protected]>2020-11-10 10:37:10 -0800
commit570d7038d06a1f38c25df0ea5d826f28a4f2e84b (patch)
treeb81a1ad30aa5bdfdcf87f21fe0c6de5aaf44d536 /module
parent52e585a822cbdba27e138bbcbeab96ab080f63d0 (diff)
Fix dnode refcount tracking
Fix a couple of places where the wrong tag is passed to dnode_{hold, rele} Reviewed-by: Alexander Motin <[email protected]> Reviewed-by: Brian Behlendorf <[email protected]> Signed-off-by: Matt Macy <[email protected]> Closes #11184
Diffstat (limited to 'module')
-rw-r--r--module/zfs/dmu_redact.c2
-rw-r--r--module/zfs/zvol.c4
2 files changed, 3 insertions, 3 deletions
diff --git a/module/zfs/dmu_redact.c b/module/zfs/dmu_redact.c
index 225ec4053..62c7d01d4 100644
--- a/module/zfs/dmu_redact.c
+++ b/module/zfs/dmu_redact.c
@@ -858,7 +858,7 @@ hold_next_object(objset_t *os, struct redact_record *rec, void *tag,
{
int err = 0;
if (*dn != NULL)
- dnode_rele(*dn, FTAG);
+ dnode_rele(*dn, tag);
*dn = NULL;
if (*object < rec->start_object) {
*object = rec->start_object - 1;
diff --git a/module/zfs/zvol.c b/module/zfs/zvol.c
index 2b20b02e4..e94bf2a3f 100644
--- a/module/zfs/zvol.c
+++ b/module/zfs/zvol.c
@@ -772,7 +772,7 @@ zvol_setup_zv(zvol_state_t *zv)
if (error)
return (SET_ERROR(error));
- error = dnode_hold(os, ZVOL_OBJ, FTAG, &zv->zv_dn);
+ error = dnode_hold(os, ZVOL_OBJ, zv, &zv->zv_dn);
if (error)
return (SET_ERROR(error));
@@ -807,7 +807,7 @@ zvol_shutdown_zv(zvol_state_t *zv)
zv->zv_zilog = NULL;
- dnode_rele(zv->zv_dn, FTAG);
+ dnode_rele(zv->zv_dn, zv);
zv->zv_dn = NULL;
/*