Gitweb:     
http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=cbc89dcfd24fd161f7a8e262266177db160a58fb
Commit:     cbc89dcfd24fd161f7a8e262266177db160a58fb
Parent:     4188c78d951d8a44630f4c33bc0f5b63374572a4
Author:     Christoph Hellwig <[EMAIL PROTECTED]>
AuthorDate: Tue Feb 5 12:14:01 2008 +1100
Committer:  Lachlan McIlroy <[EMAIL PROTECTED]>
CommitDate: Thu Feb 7 18:24:00 2008 +1100

    [XFS] kill xfs_root
    
    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 <[EMAIL PROTECTED]>
    Signed-off-by: Lachlan McIlroy <[EMAIL PROTECTED]>
---
 fs/xfs/linux-2.6/xfs_super.c |    6 ++++--
 fs/xfs/xfs_vfsops.c          |   20 --------------------
 fs/xfs/xfs_vfsops.h          |    1 -
 3 files changed, 4 insertions(+), 23 deletions(-)

diff --git a/fs/xfs/linux-2.6/xfs_super.c b/fs/xfs/linux-2.6/xfs_super.c
index 49d1d0e..56b6c69 100644
--- a/fs/xfs/linux-2.6/xfs_super.c
+++ b/fs/xfs/linux-2.6/xfs_super.c
@@ -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) {
diff --git a/fs/xfs/xfs_vfsops.c b/fs/xfs/xfs_vfsops.c
index 43b78d9..be4e0da 100644
--- a/fs/xfs/xfs_vfsops.c
+++ b/fs/xfs/xfs_vfsops.c
@@ -808,26 +808,6 @@ fscorrupt_out2:
 }
 
 /*
- * 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.
  *
  * This routine is called by vfs_sync() to make sure that things make it
diff --git a/fs/xfs/xfs_vfsops.h b/fs/xfs/xfs_vfsops.h
index ca3ae7c..1688817 100644
--- a/fs/xfs/xfs_vfsops.h
+++ b/fs/xfs/xfs_vfsops.h
@@ -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);
-
To unsubscribe from this list: send the line "unsubscribe git-commits-head" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Reply via email to