[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>

authored by Christoph Hellwig and committed by Lachlan McIlroy cbc89dcf 4188c78d

+4 -23
+4 -2
fs/xfs/linux-2.6/xfs_super.c
··· 1344 1344 sb->s_time_gran = 1; 1345 1345 set_posix_acl_flag(sb); 1346 1346 1347 - error = xfs_root(mp, &rootvp); 1348 - if (error) 1347 + rootvp = igrab(mp->m_rootip->i_vnode); 1348 + if (!rootvp) { 1349 + error = ENOENT; 1349 1350 goto fail_unmount; 1351 + } 1350 1352 1351 1353 sb->s_root = d_alloc_root(vn_to_inode(rootvp)); 1352 1354 if (!sb->s_root) {
-20
fs/xfs/xfs_vfsops.c
··· 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 - */ 817 - int 818 - xfs_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 811 * xfs_sync flushes any pending I/O to file system vfsp. 832 812 * 833 813 * This routine is called by vfs_sync() to make sure that things make it
-1
fs/xfs/xfs_vfsops.h
··· 13 13 int xfs_unmount(struct xfs_mount *mp, int flags, struct cred *credp); 14 14 int xfs_mntupdate(struct xfs_mount *mp, int *flags, 15 15 struct xfs_mount_args *args); 16 - int xfs_root(struct xfs_mount *mp, bhv_vnode_t **vpp); 17 16 int xfs_sync(struct xfs_mount *mp, int flags); 18 17 void xfs_do_force_shutdown(struct xfs_mount *mp, int flags, char *fname, 19 18 int lnnum);