Skip to content

Commit

Permalink
Removed erroneous zfs_inode_destroy() calls from zfs_rmnode().
Browse files Browse the repository at this point in the history
iput_final() already calls zpl_inode_destroy() -> zfs_inode_destroy()
for us after zfs_zinactive(), thus making sure that the inode is
properly cleaned up.

The zfs_inode_destroy() calls in zfs_rmnode() would lead to a
double-free.

Fixes openzfs#282
  • Loading branch information
gunnarbeutner authored and behlendorf committed Jun 20, 2011
1 parent df30f56 commit 6f0cf71
Showing 1 changed file with 0 additions and 3 deletions.
3 changes: 0 additions & 3 deletions module/zfs/zfs_dir.c
Original file line number Diff line number Diff line change
Expand Up @@ -614,7 +614,6 @@ zfs_rmnode(znode_t *zp)
* Leave it in the unlinked set.
*/
zfs_znode_dmu_fini(zp);
zfs_inode_destroy(ZTOI(zp));

return;
}
Expand All @@ -629,7 +628,6 @@ zfs_rmnode(znode_t *zp)
* Not enough space. Leave the file in the unlinked set.
*/
zfs_znode_dmu_fini(zp);
zfs_inode_destroy(ZTOI(zp));
return;
}

Expand Down Expand Up @@ -669,7 +667,6 @@ zfs_rmnode(znode_t *zp)
*/
dmu_tx_abort(tx);
zfs_znode_dmu_fini(zp);
zfs_inode_destroy(ZTOI(zp));
goto out;
}

Expand Down

0 comments on commit 6f0cf71

Please sign in to comment.