From b49118220ccd0e329e1e90e95b9f12bf497be89f Mon Sep 17 00:00:00 2001 From: Matthew Macy Date: Tue, 10 Nov 2020 10:37:10 -0800 Subject: [PATCH] Fix dnode refcount tracking Fix a couple of places where the wrong tag is passed to dnode_{hold, rele} Reviewed-by: Alexander Motin Reviewed-by: Brian Behlendorf Signed-off-by: Matt Macy Closes #11184 --- module/zfs/dmu_redact.c | 2 +- module/zfs/zvol.c | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/module/zfs/dmu_redact.c b/module/zfs/dmu_redact.c index 225ec40537..62c7d01d4b 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 2b20b02e49..e94bf2a3f8 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; /*