[XFS] Rework fid encode/decode wrt 64 bit inums interacting with NFS.

SGI-PV: 937127
SGI-Modid: xfs-linux:xfs-kern:24201a

Signed-off-by: Nathan Scott <nathans@sgi.com>
diff --git a/fs/xfs/linux-2.6/xfs_export.c b/fs/xfs/linux-2.6/xfs_export.c
index 3e97076..80eb249 100644
--- a/fs/xfs/linux-2.6/xfs_export.c
+++ b/fs/xfs/linux-2.6/xfs_export.c
@@ -96,9 +96,8 @@
 	int			is64 = 0;
 #if XFS_BIG_INUMS
 	vfs_t			*vfs = LINVFS_GET_VFS(inode->i_sb);
-	xfs_mount_t		*mp = XFS_VFSTOM(vfs);
 
-	if (!(mp->m_flags & XFS_MOUNT_32BITINOOPT)) {
+	if (!(vfs->vfs_flag & VFS_32BITINODES)) {
 		/* filesystem may contain 64bit inode numbers */
 		is64 = XFS_FILEID_TYPE_64FLAG;
 	}
diff --git a/fs/xfs/linux-2.6/xfs_vfs.h b/fs/xfs/linux-2.6/xfs_vfs.h
index d5fb28f..57caf9e 100644
--- a/fs/xfs/linux-2.6/xfs_vfs.h
+++ b/fs/xfs/linux-2.6/xfs_vfs.h
@@ -81,6 +81,7 @@
 #define VFS_RDONLY		0x0001	/* read-only vfs */
 #define VFS_GRPID		0x0002	/* group-ID assigned from directory */
 #define VFS_DMI			0x0004	/* filesystem has the DMI enabled */
+#define VFS_32BITINODES		0x0008	/* do not use inums above 32 bits */
 #define VFS_END			0x0008	/* max flag */
 
 #define SYNC_ATTR		0x0001	/* sync attributes */