Skip to content

Commit 3e71dd3

Browse files
committed
Fix ddtprune causing space leak
In zio_ddt_free, if a pruned dde is still in ddt, it would do nothing and cause space leak. Signed-off-by: Chunwei Chen <david.chen@nutanix.com> Fixes #17982
1 parent 7f7d493 commit 3e71dd3

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

module/zfs/zio.c

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4111,6 +4111,9 @@ zio_ddt_free(zio_t *zio)
41114111
ddt_phys_variant_t v = ddt_phys_select(ddt, dde, bp);
41124112
if (v != DDT_PHYS_NONE)
41134113
ddt_phys_decref(dde->dde_phys, v);
4114+
else
4115+
/* dde was pruned */
4116+
dde = NULL;
41144117
}
41154118
ddt_exit(ddt);
41164119

0 commit comments

Comments
 (0)