From owner-svn-src-all@FreeBSD.ORG Wed Apr 27 18:25:36 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 3CD57106564A; Wed, 27 Apr 2011 18:25:36 +0000 (UTC) (envelope-from jhb@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 2F09A8FC14; Wed, 27 Apr 2011 18:25:36 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id p3RIPanB083324; Wed, 27 Apr 2011 18:25:36 GMT (envelope-from jhb@svn.freebsd.org) Received: (from jhb@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id p3RIPaup083319; Wed, 27 Apr 2011 18:25:36 GMT (envelope-from jhb@svn.freebsd.org) Message-Id: <201104271825.p3RIPaup083319@svn.freebsd.org> From: John Baldwin Date: Wed, 27 Apr 2011 18:25:36 +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: r221128 - head/sys/fs/ext2fs 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: Wed, 27 Apr 2011 18:25:36 -0000 Author: jhb Date: Wed Apr 27 18:25:35 2011 New Revision: 221128 URL: http://svn.freebsd.org/changeset/base/221128 Log: Use a private EXT2_ROOTINO constant instead of redefining ROOTINO. Submitted by: Pedro F. Giffuni giffunip at yahoo Modified: head/sys/fs/ext2fs/ext2_lookup.c head/sys/fs/ext2fs/ext2_vfsops.c head/sys/fs/ext2fs/ext2_vnops.c head/sys/fs/ext2fs/inode.h Modified: head/sys/fs/ext2fs/ext2_lookup.c ============================================================================== --- head/sys/fs/ext2fs/ext2_lookup.c Wed Apr 27 18:19:26 2011 (r221127) +++ head/sys/fs/ext2fs/ext2_lookup.c Wed Apr 27 18:25:35 2011 (r221128) @@ -57,9 +57,10 @@ #include #include -#include #include +#include #include +#include #ifdef DIAGNOSTIC static int dirchk = 1; @@ -1056,7 +1057,7 @@ ext2_checkpath(source, target, cred) error = EEXIST; goto out; } - rootino = ROOTINO; + rootino = EXT2_ROOTINO; error = 0; if (target->i_number == rootino) goto out; Modified: head/sys/fs/ext2fs/ext2_vfsops.c ============================================================================== --- head/sys/fs/ext2fs/ext2_vfsops.c Wed Apr 27 18:19:26 2011 (r221127) +++ head/sys/fs/ext2fs/ext2_vfsops.c Wed Apr 27 18:25:35 2011 (r221128) @@ -983,7 +983,7 @@ ext2_fhtovp(struct mount *mp, struct fid ufhp = (struct ufid *)fhp; fs = VFSTOEXT2(mp)->um_e2fs; - if (ufhp->ufid_ino < ROOTINO || + if (ufhp->ufid_ino < EXT2_ROOTINO || ufhp->ufid_ino > fs->e2fs_gcount * fs->e2fs->e2fs_ipg) return (ESTALE); @@ -1063,7 +1063,7 @@ ext2_root(struct mount *mp, int flags, s struct vnode *nvp; int error; - error = VFS_VGET(mp, (ino_t)ROOTINO, LK_EXCLUSIVE, &nvp); + error = VFS_VGET(mp, EXT2_ROOTINO, LK_EXCLUSIVE, &nvp); if (error) return (error); *vpp = nvp; Modified: head/sys/fs/ext2fs/ext2_vnops.c ============================================================================== --- head/sys/fs/ext2fs/ext2_vnops.c Wed Apr 27 18:19:26 2011 (r221127) +++ head/sys/fs/ext2fs/ext2_vnops.c Wed Apr 27 18:25:35 2011 (r221128) @@ -71,12 +71,13 @@ #include -#include -#include #include +#include #include #include +#include #include +#include static int ext2_makeinode(int mode, struct vnode *, struct vnode **, struct componentname *); static void ext2_itimes_locked(struct vnode *); @@ -1581,7 +1582,7 @@ ext2_vinit(mntp, fifoops, vpp) if (vp->v_type == VFIFO) vp->v_op = fifoops; - if (ip->i_number == ROOTINO) + if (ip->i_number == EXT2_ROOTINO) vp->v_vflag |= VV_ROOT; ip->i_modrev = init_va_filerev(); *vpp = vp; Modified: head/sys/fs/ext2fs/inode.h ============================================================================== --- head/sys/fs/ext2fs/inode.h Wed Apr 27 18:19:26 2011 (r221127) +++ head/sys/fs/ext2fs/inode.h Wed Apr 27 18:25:35 2011 (r221128) @@ -41,8 +41,6 @@ #include #include -#define ROOTINO ((ino_t)2) - #define NDADDR 12 /* Direct addresses in inode. */ #define NIADDR 3 /* Indirect addresses in inode. */