aboutsummaryrefslogtreecommitdiffstats
path: root/fs/xfs
diff options
context:
space:
mode:
authorChristoph Hellwig <hch@infradead.org>2008-02-04 20:14:01 -0500
committerLachlan McIlroy <lachlan@redback.melbourne.sgi.com>2008-02-07 02:24:00 -0500
commitcbc89dcfd24fd161f7a8e262266177db160a58fb (patch)
tree135e0ce9605b4e91357570def1b3869a35f5592e /fs/xfs
parent4188c78d951d8a44630f4c33bc0f5b63374572a4 (diff)
[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 <hch@infradead.org> Signed-off-by: Lachlan McIlroy <lachlan@sgi.com>
Diffstat (limited to 'fs/xfs')
-rw-r--r--fs/xfs/linux-2.6/xfs_super.c6
-rw-r--r--fs/xfs/xfs_vfsops.c20
-rw-r--r--fs/xfs/xfs_vfsops.h1
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 49d1d0ee6c23..56b6c6985d90 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(
1344 sb->s_time_gran = 1; 1344 sb->s_time_gran = 1;
1345 set_posix_acl_flag(sb); 1345 set_posix_acl_flag(sb);
1346 1346
1347 error = xfs_root(mp, &rootvp); 1347 rootvp = igrab(mp->m_rootip->i_vnode);
1348 if (error) 1348 if (!rootvp) {
1349 error = ENOENT;
1349 goto fail_unmount; 1350 goto fail_unmount;
1351 }
1350 1352
1351 sb->s_root = d_alloc_root(vn_to_inode(rootvp)); 1353 sb->s_root = d_alloc_root(vn_to_inode(rootvp));
1352 if (!sb->s_root) { 1354 if (!sb->s_root) {
diff --git a/fs/xfs/xfs_vfsops.c b/fs/xfs/xfs_vfsops.c
index 43b78d9dc119..be4e0daaf6bd 100644
--- a/fs/xfs/xfs_vfsops.c
+++ b/fs/xfs/xfs_vfsops.c
@@ -808,26 +808,6 @@ fscorrupt_out2:
808} 808}
809 809
810/* 810/*
811 * xfs_root extracts the root vnode from a vfs.
812 *
813 * vfsp -- the vfs struct for the desired file system
814 * vpp -- address of the caller's vnode pointer which should be
815 * set to the desired fs root vnode
816 */
817int
818xfs_root(
819 xfs_mount_t *mp,
820 bhv_vnode_t **vpp)
821{
822 bhv_vnode_t *vp;
823
824 vp = XFS_ITOV(mp->m_rootip);
825 VN_HOLD(vp);
826 *vpp = vp;
827 return 0;
828}
829
830/*
831 * xfs_sync flushes any pending I/O to file system vfsp. 811 * xfs_sync flushes any pending I/O to file system vfsp.
832 * 812 *
833 * This routine is called by vfs_sync() to make sure that things make it 813 * 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 ca3ae7c879c9..1688817c55ed 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,
13int xfs_unmount(struct xfs_mount *mp, int flags, struct cred *credp); 13int xfs_unmount(struct xfs_mount *mp, int flags, struct cred *credp);
14int xfs_mntupdate(struct xfs_mount *mp, int *flags, 14int xfs_mntupdate(struct xfs_mount *mp, int *flags,
15 struct xfs_mount_args *args); 15 struct xfs_mount_args *args);
16int xfs_root(struct xfs_mount *mp, bhv_vnode_t **vpp);
17int xfs_sync(struct xfs_mount *mp, int flags); 16int xfs_sync(struct xfs_mount *mp, int flags);
18void xfs_do_force_shutdown(struct xfs_mount *mp, int flags, char *fname, 17void xfs_do_force_shutdown(struct xfs_mount *mp, int flags, char *fname,
19 int lnnum); 18 int lnnum);