Fix dnode refcount tracking

Fix a couple of places where the wrong tag is passed
to dnode_{hold, rele}

Reviewed-by: Alexander Motin <mav@FreeBSD.org>
Reviewed-by: Brian Behlendorf <behlendorf1@llnl.gov>
Signed-off-by: Matt Macy <mmacy@FreeBSD.org>
Closes #11184
This commit is contained in:
Matthew Macy 2020-11-10 10:37:10 -08:00 committed by Brian Behlendorf
parent 806dda56ce
commit b49118220c
2 changed files with 3 additions and 3 deletions

View File

@ -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;

View File

@ -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;
/*