diff options
author | Brian Behlendorf <[email protected]> | 2011-02-17 11:26:51 -0800 |
---|---|---|
committer | Brian Behlendorf <[email protected]> | 2011-02-17 11:34:47 -0800 |
commit | efd1832bc615a4e32259e31d1c7ff0af14f5c1b2 (patch) | |
tree | 9ebec5127767074751a74c93eb86aece0e304f7f /module/zfs | |
parent | 5095000169f695ea6b65d74da917c3f465d05aab (diff) |
Fix symlink(2) inode reference count
Under Linux sys_symlink(2) should result in a inode being created
with one reference for the inode itself, and a second reference on
the inode which is held by the new dentry. Under Solaris this
appears not to be the case. Their zfs_symlink() handler drops
the inode reference before returning.
The result of this under Linux is that the reference count for
symlinks is always one smaller than it should have been. This
results in a BUG() when the symlink is unlinked. To handle this
the Linux port now keeps the inode reference which differs from
the Solaris behavior. This results in correct reference counts.
Closes #96
Diffstat (limited to 'module/zfs')
-rw-r--r-- | module/zfs/zfs_vnops.c | 1 |
1 files changed, 0 insertions, 1 deletions
diff --git a/module/zfs/zfs_vnops.c b/module/zfs/zfs_vnops.c index 8bff0ef4b..fcc85b8a0 100644 --- a/module/zfs/zfs_vnops.c +++ b/module/zfs/zfs_vnops.c @@ -3169,7 +3169,6 @@ top: zfs_dirent_unlock(dl); *ipp = ZTOI(zp); - iput(ZTOI(zp)); if (zsb->z_os->os_sync == ZFS_SYNC_ALWAYS) zil_commit(zilog, 0); |