Skip to content

Commit 2f1a2bb

Browse files
mattmacyjsai20
authored andcommitted
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 openzfs#11184
1 parent d671c28 commit 2f1a2bb

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

module/zfs/dmu_redact.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -858,7 +858,7 @@ hold_next_object(objset_t *os, struct redact_record *rec, void *tag,
858858
{
859859
int err = 0;
860860
if (*dn != NULL)
861-
dnode_rele(*dn, FTAG);
861+
dnode_rele(*dn, tag);
862862
*dn = NULL;
863863
if (*object < rec->start_object) {
864864
*object = rec->start_object - 1;

module/zfs/zvol.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -772,7 +772,7 @@ zvol_setup_zv(zvol_state_t *zv)
772772
if (error)
773773
return (SET_ERROR(error));
774774

775-
error = dnode_hold(os, ZVOL_OBJ, FTAG, &zv->zv_dn);
775+
error = dnode_hold(os, ZVOL_OBJ, zv, &zv->zv_dn);
776776
if (error)
777777
return (SET_ERROR(error));
778778

@@ -807,7 +807,7 @@ zvol_shutdown_zv(zvol_state_t *zv)
807807

808808
zv->zv_zilog = NULL;
809809

810-
dnode_rele(zv->zv_dn, FTAG);
810+
dnode_rele(zv->zv_dn, zv);
811811
zv->zv_dn = NULL;
812812

813813
/*

0 commit comments

Comments
 (0)