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:
parent
52e585a822
commit
570d7038d0
|
@ -858,7 +858,7 @@ hold_next_object(objset_t *os, struct redact_record *rec, void *tag,
|
||||||
{
|
{
|
||||||
int err = 0;
|
int err = 0;
|
||||||
if (*dn != NULL)
|
if (*dn != NULL)
|
||||||
dnode_rele(*dn, FTAG);
|
dnode_rele(*dn, tag);
|
||||||
*dn = NULL;
|
*dn = NULL;
|
||||||
if (*object < rec->start_object) {
|
if (*object < rec->start_object) {
|
||||||
*object = rec->start_object - 1;
|
*object = rec->start_object - 1;
|
||||||
|
|
|
@ -772,7 +772,7 @@ zvol_setup_zv(zvol_state_t *zv)
|
||||||
if (error)
|
if (error)
|
||||||
return (SET_ERROR(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)
|
if (error)
|
||||||
return (SET_ERROR(error));
|
return (SET_ERROR(error));
|
||||||
|
|
||||||
|
@ -807,7 +807,7 @@ zvol_shutdown_zv(zvol_state_t *zv)
|
||||||
|
|
||||||
zv->zv_zilog = NULL;
|
zv->zv_zilog = NULL;
|
||||||
|
|
||||||
dnode_rele(zv->zv_dn, FTAG);
|
dnode_rele(zv->zv_dn, zv);
|
||||||
zv->zv_dn = NULL;
|
zv->zv_dn = NULL;
|
||||||
|
|
||||||
/*
|
/*
|
||||||
|
|
Loading…
Reference in New Issue