aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGunnar Beutner <[email protected]>2011-06-16 20:59:56 +0200
committerBrian Behlendorf <[email protected]>2011-06-20 10:30:17 -0700
commit6f0cf71e0d191abb850a45f6d216cb5af158a6dd (patch)
treed5d52fab9a839bf17b6d945de51f160e36e453a9
parentdf30f56639f96175ba71d83b4456ccf410c46542 (diff)
Removed erroneous zfs_inode_destroy() calls from zfs_rmnode().
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 #282
-rw-r--r--module/zfs/zfs_dir.c3
1 files changed, 0 insertions, 3 deletions
diff --git a/module/zfs/zfs_dir.c b/module/zfs/zfs_dir.c
index 199e58cf7..58a18bcfc 100644
--- a/module/zfs/zfs_dir.c
+++ b/module/zfs/zfs_dir.c
@@ -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;
}
@@ -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;
}
@@ -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;
}