From owner-svn-src-all@FreeBSD.ORG Wed Mar 18 16:19:44 2009 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id C64EC106566B; Wed, 18 Mar 2009 16:19:44 +0000 (UTC) (envelope-from jhb@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id B41668FC12; Wed, 18 Mar 2009 16:19:44 +0000 (UTC) (envelope-from jhb@FreeBSD.org) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id n2IGJi5C031032; Wed, 18 Mar 2009 16:19:44 GMT (envelope-from jhb@svn.freebsd.org) Received: (from jhb@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id n2IGJifl031031; Wed, 18 Mar 2009 16:19:44 GMT (envelope-from jhb@svn.freebsd.org) Message-Id: <200903181619.n2IGJifl031031@svn.freebsd.org> From: John Baldwin Date: Wed, 18 Mar 2009 16:19:44 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r189967 - head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 18 Mar 2009 16:19:45 -0000 Author: jhb Date: Wed Mar 18 16:19:44 2009 New Revision: 189967 URL: http://svn.freebsd.org/changeset/base/189967 Log: 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 Modified: head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_dir.c Modified: head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_dir.c ============================================================================== --- head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_dir.c Wed Mar 18 16:09:05 2009 (r189966) +++ head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_dir.c Wed Mar 18 16:19:44 2009 (r189967) @@ -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); }