diff options
author | jhb <jhb@FreeBSD.org> | 2011-04-27 18:25:35 +0000 |
---|---|---|
committer | jhb <jhb@FreeBSD.org> | 2011-04-27 18:25:35 +0000 |
commit | 09fd1db2a07e44c41a4341b1dcc53c381d095ffd (patch) | |
tree | 8c93225a3d02b804665bcdb623009a25b1ed0595 /sys/fs | |
parent | b6ed6bf65d437f20a27d864b19504b1b74794647 (diff) | |
download | FreeBSD-src-09fd1db2a07e44c41a4341b1dcc53c381d095ffd.zip FreeBSD-src-09fd1db2a07e44c41a4341b1dcc53c381d095ffd.tar.gz |
Use a private EXT2_ROOTINO constant instead of redefining ROOTINO.
Submitted by: Pedro F. Giffuni giffunip at yahoo
Diffstat (limited to 'sys/fs')
-rw-r--r-- | sys/fs/ext2fs/ext2_lookup.c | 5 | ||||
-rw-r--r-- | sys/fs/ext2fs/ext2_vfsops.c | 4 | ||||
-rw-r--r-- | sys/fs/ext2fs/ext2_vnops.c | 7 | ||||
-rw-r--r-- | sys/fs/ext2fs/inode.h | 2 |
4 files changed, 9 insertions, 9 deletions
diff --git a/sys/fs/ext2fs/ext2_lookup.c b/sys/fs/ext2fs/ext2_lookup.c index 54eee62..ca6a8d2 100644 --- a/sys/fs/ext2fs/ext2_lookup.c +++ b/sys/fs/ext2fs/ext2_lookup.c @@ -57,9 +57,10 @@ #include <fs/ext2fs/inode.h> #include <fs/ext2fs/ext2_mount.h> -#include <fs/ext2fs/ext2_extern.h> #include <fs/ext2fs/ext2fs.h> +#include <fs/ext2fs/ext2_dinode.h> #include <fs/ext2fs/ext2_dir.h> +#include <fs/ext2fs/ext2_extern.h> #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; diff --git a/sys/fs/ext2fs/ext2_vfsops.c b/sys/fs/ext2fs/ext2_vfsops.c index 041a3a5..5c807dc 100644 --- a/sys/fs/ext2fs/ext2_vfsops.c +++ b/sys/fs/ext2fs/ext2_vfsops.c @@ -983,7 +983,7 @@ ext2_fhtovp(struct mount *mp, struct fid *fhp, struct vnode **vpp) 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, struct vnode **vpp) 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; diff --git a/sys/fs/ext2fs/ext2_vnops.c b/sys/fs/ext2fs/ext2_vnops.c index 2d302c5..5333785 100644 --- a/sys/fs/ext2fs/ext2_vnops.c +++ b/sys/fs/ext2fs/ext2_vnops.c @@ -71,12 +71,13 @@ #include <ufs/ufs/dir.h> -#include <fs/ext2fs/inode.h> -#include <fs/ext2fs/ext2_mount.h> #include <fs/ext2fs/fs.h> +#include <fs/ext2fs/inode.h> #include <fs/ext2fs/ext2_extern.h> #include <fs/ext2fs/ext2fs.h> +#include <fs/ext2fs/ext2_dinode.h> #include <fs/ext2fs/ext2_dir.h> +#include <fs/ext2fs/ext2_mount.h> 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; diff --git a/sys/fs/ext2fs/inode.h b/sys/fs/ext2fs/inode.h index 99437d5..ae794d7 100644 --- a/sys/fs/ext2fs/inode.h +++ b/sys/fs/ext2fs/inode.h @@ -41,8 +41,6 @@ #include <sys/lock.h> #include <sys/queue.h> -#define ROOTINO ((ino_t)2) - #define NDADDR 12 /* Direct addresses in inode. */ #define NIADDR 3 /* Indirect addresses in inode. */ |