Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 23 Aug 2011 08:47:27 +0000 (UTC)
From:      "Andrey V. Elsukov" <ae@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org
Subject:   svn commit: r225104 - head/sys/ufs/ufs
Message-ID:  <201108230847.p7N8lRO2092643@svn.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: ae
Date: Tue Aug 23 08:47:27 2011
New Revision: 225104
URL: http://svn.freebsd.org/changeset/base/225104

Log:
  Fix lock leak.
  
  Reported by:	Alex Lyashkov
  Approved by:	re (kib)
  MFC after:	1 week

Modified:
  head/sys/ufs/ufs/ufs_extattr.c

Modified: head/sys/ufs/ufs/ufs_extattr.c
==============================================================================
--- head/sys/ufs/ufs/ufs_extattr.c	Tue Aug 23 07:42:04 2011	(r225103)
+++ head/sys/ufs/ufs/ufs_extattr.c	Tue Aug 23 08:47:27 2011	(r225104)
@@ -1031,14 +1031,14 @@ vop_setextattr {
 	struct ufsmount *ump = VFSTOUFS(mp); 
 	int error;
 
-	ufs_extattr_uepm_lock(ump, ap->a_td);
-
 	/*
 	 * XXX: No longer a supported way to delete extended attributes.
 	 */
 	if (ap->a_uio == NULL)
 		return (EINVAL);
 
+	ufs_extattr_uepm_lock(ump, ap->a_td);
+
 	error = ufs_extattr_set(ap->a_vp, ap->a_attrnamespace, ap->a_name,
 	    ap->a_uio, ap->a_cred, ap->a_td);
 



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201108230847.p7N8lRO2092643>