diff options
author | jhb <jhb@FreeBSD.org> | 2009-03-18 16:19:44 +0000 |
---|---|---|
committer | jhb <jhb@FreeBSD.org> | 2009-03-18 16:19:44 +0000 |
commit | da7f58f716275d70ebc25ba371f5d4686815e1a0 (patch) | |
tree | b2c259418bb3a4c9aab586a2d4299a70622d9f77 /sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_dir.c | |
parent | 79d9ed6723c9d90043857c9fce71acc2c10464f3 (diff) | |
download | FreeBSD-src-da7f58f716275d70ebc25ba371f5d4686815e1a0.zip FreeBSD-src-da7f58f716275d70ebc25ba371f5d4686815e1a0.tar.gz |
The zfs_get_xattrdir() function is used to find the extended attribute
directory for a znode. When the directory already exists, it returns a
referenced but unlocked vnode. When a directory does not yet exist, it
calls zfs_make_xattrdir() to create a new one. zfs_make_xattrdir() returns
the vnode both referenced and and locked and zfs_get_xattrdir() was leaking
this vnode lock to its callers. Fix this by dropping the vnode lock if
zfs_make_xattrdir() successfully creates a new extended attribute
directory.
Reviewed by: pjd
Diffstat (limited to 'sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_dir.c')
-rw-r--r-- | sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_dir.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_dir.c b/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_dir.c index 45ec88b..3ae43f1 100644 --- a/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_dir.c +++ b/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_dir.c @@ -940,6 +940,8 @@ top: /* NB: we already did dmu_tx_wait() if necessary */ goto top; } + if (error == 0) + VOP_UNLOCK(*xvpp, 0); return (error); } |