Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 16 Oct 2014 12:41:15 +0000 (UTC)
From:      Mateusz Guzik <mjg@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org
Subject:   svn commit: r273165 - head/sys/ufs/ufs
Message-ID:  <201410161241.s9GCfFHO007663@svn.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: mjg
Date: Thu Oct 16 12:41:14 2014
New Revision: 273165
URL: https://svnweb.freebsd.org/changeset/base/273165

Log:
  Use lockless quota checks in qsync and qsyncvp.
  
  No strong objections from: kib, mckusick
  MFC after:	1 week

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

Modified: head/sys/ufs/ufs/ufs_quota.c
==============================================================================
--- head/sys/ufs/ufs/ufs_quota.c	Thu Oct 16 09:09:43 2014	(r273164)
+++ head/sys/ufs/ufs/ufs_quota.c	Thu Oct 16 12:41:14 2014	(r273165)
@@ -1035,11 +1035,9 @@ qsync(struct mount *mp)
 	 * Check if the mount point has any quotas.
 	 * If not, simply return.
 	 */
-	UFS_LOCK(ump);
 	for (i = 0; i < MAXQUOTAS; i++)
 		if (ump->um_quotas[i] != NULLVP)
 			break;
-	UFS_UNLOCK(ump);
 	if (i == MAXQUOTAS)
 		return (0);
 	/*
@@ -1084,11 +1082,9 @@ qsyncvp(struct vnode *vp)
 	 * Check if the mount point has any quotas.
 	 * If not, simply return.
 	 */
-	UFS_LOCK(ump);
 	for (i = 0; i < MAXQUOTAS; i++)
 		if (ump->um_quotas[i] != NULLVP)
 			break;
-	UFS_UNLOCK(ump);
 	if (i == MAXQUOTAS)
 		return (0);
 	/*



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