]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/commit
The zfs_get_xattrdir() function is used to find the extended attribute
authorJohn Baldwin <jhb@FreeBSD.org>
Wed, 18 Mar 2009 16:19:44 +0000 (16:19 +0000)
committerJohn Baldwin <jhb@FreeBSD.org>
Wed, 18 Mar 2009 16:19:44 +0000 (16:19 +0000)
commit9fca7a854ce3350705a7237c2795d52244264d85
treeb2c259418bb3a4c9aab586a2d4299a70622d9f77
parente5470fee62ff268e9f47beccf8a56162d28a2cc6
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
sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_dir.c