Date: Tue, 28 Oct 2008 12:00:29 +0000 (UTC) From: Konstantin Belousov <kib@FreeBSD.org> To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r184408 - head/sys/ufs/ufs Message-ID: <200810281200.m9SC0TPn093348@svn.freebsd.org>
next in thread | raw e-mail | index | archive | help
Author: kib Date: Tue Oct 28 12:00:28 2008 New Revision: 184408 URL: http://svn.freebsd.org/changeset/base/184408 Log: Provide an explanation for getinoquota() call in the ufs_access vop. MFC after: 3 days Modified: head/sys/ufs/ufs/ufs_vnops.c Modified: head/sys/ufs/ufs/ufs_vnops.c ============================================================================== --- head/sys/ufs/ufs/ufs_vnops.c Tue Oct 28 11:33:06 2008 (r184407) +++ head/sys/ufs/ufs/ufs_vnops.c Tue Oct 28 12:00:28 2008 (r184408) @@ -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) != LK_EXCLUSIVE) { + + /* + * Upgrade vnode lock, since getinoquota() + * requires exclusive lock to modify inode. + */ relocked = 1; vhold(vp); vn_lock(vp, LK_UPGRADE | LK_RETRY);
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200810281200.m9SC0TPn093348>