]> www.pilppa.org Git - linux-2.6-omap-h63xx.git/commitdiff
[XFS] kill xfs_root
authorChristoph Hellwig <hch@infradead.org>
Tue, 5 Feb 2008 01:14:01 +0000 (12:14 +1100)
committerLachlan McIlroy <lachlan@redback.melbourne.sgi.com>
Thu, 7 Feb 2008 07:24:00 +0000 (18:24 +1100)
The only caller (xfs_fs_fill_super) can simplify call igrab on the root
inode.

SGI-PV: 971186
SGI-Modid: xfs-linux-melb:xfs-kern:30393a

Signed-off-by: Christoph Hellwig <hch@infradead.org>
Signed-off-by: Lachlan McIlroy <lachlan@sgi.com>
fs/xfs/linux-2.6/xfs_super.c
fs/xfs/xfs_vfsops.c
fs/xfs/xfs_vfsops.h

index 49d1d0ee6c231c5b4ed2c82635e450984542cf46..56b6c6985d9039b2543e58addc7f75138338e1a9 100644 (file)
@@ -1344,9 +1344,11 @@ xfs_fs_fill_super(
        sb->s_time_gran = 1;
        set_posix_acl_flag(sb);
 
-       error = xfs_root(mp, &rootvp);
-       if (error)
+       rootvp = igrab(mp->m_rootip->i_vnode);
+       if (!rootvp) {
+               error = ENOENT;
                goto fail_unmount;
+       }
 
        sb->s_root = d_alloc_root(vn_to_inode(rootvp));
        if (!sb->s_root) {
index 43b78d9dc1193989c5f647aaa2770fe1d39454b1..be4e0daaf6bdb215e69a60d5eb9a8162bebbad9b 100644 (file)
@@ -807,26 +807,6 @@ fscorrupt_out2:
        return XFS_ERROR(EFSCORRUPTED);
 }
 
-/*
- * xfs_root extracts the root vnode from a vfs.
- *
- * vfsp -- the vfs struct for the desired file system
- * vpp  -- address of the caller's vnode pointer which should be
- *         set to the desired fs root vnode
- */
-int
-xfs_root(
-       xfs_mount_t     *mp,
-       bhv_vnode_t     **vpp)
-{
-       bhv_vnode_t     *vp;
-
-       vp = XFS_ITOV(mp->m_rootip);
-       VN_HOLD(vp);
-       *vpp = vp;
-       return 0;
-}
-
 /*
  * xfs_sync flushes any pending I/O to file system vfsp.
  *
index ca3ae7c879c97eaec26810ab56a305f9654a2f6e..1688817c55ed358adeb13a31a04acf05486040a5 100644 (file)
@@ -13,7 +13,6 @@ int xfs_mount(struct xfs_mount *mp, struct xfs_mount_args *args,
 int xfs_unmount(struct xfs_mount *mp, int flags, struct cred *credp);
 int xfs_mntupdate(struct xfs_mount *mp, int *flags,
                struct xfs_mount_args *args);
-int xfs_root(struct xfs_mount *mp, bhv_vnode_t **vpp);
 int xfs_sync(struct xfs_mount *mp, int flags);
 void xfs_do_force_shutdown(struct xfs_mount *mp, int flags, char *fname,
                int lnnum);