From owner-svn-src-all@FreeBSD.ORG Mon Mar 7 22:36:11 2011 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 76554106564A; Mon, 7 Mar 2011 22:36:11 +0000 (UTC) (envelope-from kib@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 534178FC13; Mon, 7 Mar 2011 22:36:11 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id p27MaBqP049388; Mon, 7 Mar 2011 22:36:11 GMT (envelope-from kib@svn.freebsd.org) Received: (from kib@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id p27MaBlO049385; Mon, 7 Mar 2011 22:36:11 GMT (envelope-from kib@svn.freebsd.org) Message-Id: <201103072236.p27MaBlO049385@svn.freebsd.org> From: Konstantin Belousov Date: Mon, 7 Mar 2011 22:36:11 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r219388 - head/sys/ufs/ufs X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 07 Mar 2011 22:36:11 -0000 Author: kib Date: Mon Mar 7 22:36:11 2011 New Revision: 219388 URL: http://svn.freebsd.org/changeset/base/219388 Log: Simplify uses of the web of pointers. Reviewed by: mckusick MFC after: 1 week Modified: head/sys/ufs/ufs/ufs_dirhash.c head/sys/ufs/ufs/ufs_quota.c Modified: head/sys/ufs/ufs/ufs_dirhash.c ============================================================================== --- head/sys/ufs/ufs/ufs_dirhash.c Mon Mar 7 21:53:15 2011 (r219387) +++ head/sys/ufs/ufs/ufs_dirhash.c Mon Mar 7 22:36:11 2011 (r219388) @@ -426,7 +426,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. */ @@ -587,7 +587,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; seqoff = dh->dh_seqoff; Modified: head/sys/ufs/ufs/ufs_quota.c ============================================================================== --- head/sys/ufs/ufs/ufs_quota.c Mon Mar 7 21:53:15 2011 (r219387) +++ head/sys/ufs/ufs/ufs_quota.c Mon Mar 7 22:36:11 2011 (r219388) @@ -232,8 +232,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); @@ -278,8 +277,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); @@ -378,8 +376,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); @@ -423,8 +420,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); @@ -455,7 +451,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;