Date: Mon, 3 Nov 2008 14:35:43 +0000 (UTC) From: Konstantin Belousov <kib@FreeBSD.org> To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-7@freebsd.org Subject: svn commit: r184593 - in stable/7/sys: . ufs/ufs Message-ID: <200811031435.mA3EZhUC068702@svn.freebsd.org>
next in thread | raw e-mail | index | archive | help
Author: kib Date: Mon Nov 3 14:35:43 2008 New Revision: 184593 URL: http://svn.freebsd.org/changeset/base/184593 Log: MFC r184408: Provide an explanation for getinoquota() call in the ufs_access vop. Approved by: re (kensmith) Modified: stable/7/sys/ (props changed) stable/7/sys/ufs/ufs/ufs_vnops.c Modified: stable/7/sys/ufs/ufs/ufs_vnops.c ============================================================================== --- stable/7/sys/ufs/ufs/ufs_vnops.c Mon Nov 3 14:23:15 2008 (r184592) +++ stable/7/sys/ufs/ufs/ufs_vnops.c Mon Nov 3 14:35:43 2008 (r184593) @@ -330,7 +330,18 @@ ufs_access(ap) if (vp->v_mount->mnt_flag & MNT_RDONLY) return (EROFS); #ifdef QUOTA + /* + * Inode is accounted in the quotas only if struct + * dquot is attached to it. VOP_ACCESS() is called + * from vn_open_cred() and provides a convenient + * point to call getinoquota(). + */ if (VOP_ISLOCKED(vp, ap->a_td) != LK_EXCLUSIVE) { + + /* + * Upgrade vnode lock, since getinoquota() + * requires exclusive lock to modify inode. + */ relocked = 1; vhold(vp); vn_lock(vp, LK_UPGRADE | LK_RETRY, ap->a_td);
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200811031435.mA3EZhUC068702>