svn commit: r219637 - stable/8/sys/ufs/ufs

Konstantin Belousov kib at FreeBSD.org
Mon Mar 14 11:20:27 UTC 2011


Author: kib
Date: Mon Mar 14 11:20:26 2011
New Revision: 219637
URL: http://svn.freebsd.org/changeset/base/219637

Log:
  MFC r219388:
  Simplify uses of the web of pointers.

Modified:
  stable/8/sys/ufs/ufs/ufs_dirhash.c
  stable/8/sys/ufs/ufs/ufs_quota.c
Directory Properties:
  stable/8/sys/   (props changed)
  stable/8/sys/amd64/include/xen/   (props changed)
  stable/8/sys/cddl/contrib/opensolaris/   (props changed)
  stable/8/sys/contrib/dev/acpica/   (props changed)
  stable/8/sys/contrib/pf/   (props changed)

Modified: stable/8/sys/ufs/ufs/ufs_dirhash.c
==============================================================================
--- stable/8/sys/ufs/ufs/ufs_dirhash.c	Mon Mar 14 11:07:12 2011	(r219636)
+++ stable/8/sys/ufs/ufs/ufs_dirhash.c	Mon Mar 14 11:20:26 2011	(r219637)
@@ -428,7 +428,7 @@ ufsdirhash_build(struct inode *ip)
 	}
 	for (i = 0; i < dirblocks; i++)
 		dh->dh_blkfree[i] = DIRBLKSIZ / DIRALIGN;
-	bmask = VFSTOUFS(vp->v_mount)->um_mountp->mnt_stat.f_iosize - 1;
+	bmask = vp->v_mount->mnt_stat.f_iosize - 1;
 	pos = 0;
 	while (pos < ip->i_size) {
 		/* If necessary, get the next directory block. */
@@ -589,7 +589,7 @@ ufsdirhash_lookup(struct inode *ip, char
 	DIRHASHLIST_UNLOCK();
 
 	vp = ip->i_vnode;
-	bmask = VFSTOUFS(vp->v_mount)->um_mountp->mnt_stat.f_iosize - 1;
+	bmask = vp->v_mount->mnt_stat.f_iosize - 1;
 	blkoff = -1;
 	bp = NULL;
 restart:

Modified: stable/8/sys/ufs/ufs/ufs_quota.c
==============================================================================
--- stable/8/sys/ufs/ufs/ufs_quota.c	Mon Mar 14 11:07:12 2011	(r219636)
+++ stable/8/sys/ufs/ufs/ufs_quota.c	Mon Mar 14 11:20:26 2011	(r219637)
@@ -220,8 +220,7 @@ chkdq(struct inode *ip, ufs2_daddr_t cha
 		/* Reset timer when crossing soft limit */
 		if (dq->dq_curblocks + change >= dq->dq_bsoftlimit &&
 		    dq->dq_curblocks < dq->dq_bsoftlimit)
-			dq->dq_btime = time_second +
-			    VFSTOUFS(ITOV(ip)->v_mount)->um_btime[i];
+			dq->dq_btime = time_second + ip->i_ump->um_btime[i];
 		dq->dq_curblocks += change;
 		dq->dq_flags |= DQ_MOD;
 		DQI_UNLOCK(dq);
@@ -266,8 +265,7 @@ chkdqchg(struct inode *ip, ufs2_daddr_t 
 	 */
 	if (ncurblocks >= dq->dq_bsoftlimit && dq->dq_bsoftlimit) {
 		if (dq->dq_curblocks < dq->dq_bsoftlimit) {
-			dq->dq_btime = time_second +
-			    VFSTOUFS(ITOV(ip)->v_mount)->um_btime[type];
+			dq->dq_btime = time_second + ip->i_ump->um_btime[type];
 			if (ip->i_uid == cred->cr_uid)
 				*warn = 1;
 			return (0);
@@ -366,8 +364,7 @@ chkiq(struct inode *ip, int change, stru
 		/* Reset timer when crossing soft limit */
 		if (dq->dq_curinodes + change >= dq->dq_isoftlimit &&
 		    dq->dq_curinodes < dq->dq_isoftlimit)
-			dq->dq_itime = time_second +
-			    VFSTOUFS(ITOV(ip)->v_mount)->um_itime[i];
+			dq->dq_itime = time_second + ip->i_ump->um_itime[i];
 		dq->dq_curinodes += change;
 		dq->dq_flags |= DQ_MOD;
 		DQI_UNLOCK(dq);
@@ -411,8 +408,7 @@ chkiqchg(struct inode *ip, int change, s
 	 */
 	if (ncurinodes >= dq->dq_isoftlimit && dq->dq_isoftlimit) {
 		if (dq->dq_curinodes < dq->dq_isoftlimit) {
-			dq->dq_itime = time_second +
-			    VFSTOUFS(ITOV(ip)->v_mount)->um_itime[type];
+			dq->dq_itime = time_second + ip->i_ump->um_itime[type];
 			if (ip->i_uid == cred->cr_uid)
 				*warn = 1;
 			return (0);
@@ -443,7 +439,7 @@ chkiqchg(struct inode *ip, int change, s
 static void
 chkdquot(struct inode *ip)
 {
-	struct ufsmount *ump = VFSTOUFS(ITOV(ip)->v_mount);
+	struct ufsmount *ump = ip->i_ump;
 	struct vnode *vp = ITOV(ip);
 	int i;
 


More information about the svn-src-stable-8 mailing list