[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/xfs_vfsops.c b/fs/xfs/xfs_vfsops.c
index f4f8805..dd419e1 100644
--- a/fs/xfs/xfs_vfsops.c
+++ b/fs/xfs/xfs_vfsops.c
@@ -269,7 +269,7 @@
 	if (ap->flags & XFSMNT_OSYNCISOSYNC)
 		mp->m_flags |= XFS_MOUNT_OSYNCISOSYNC;
 	if (ap->flags & XFSMNT_32BITINODES)
-		mp->m_flags |= (XFS_MOUNT_32BITINODES | XFS_MOUNT_32BITINOOPT);
+		mp->m_flags |= XFS_MOUNT_32BITINODES;
 
 	if (ap->flags & XFSMNT_IOSIZE) {
 		if (ap->iosizelog > XFS_MAX_IO_LOG ||
@@ -1868,6 +1868,9 @@
 		args->sunit = args->swidth = 0;
 	}
 
+	if (args->flags & XFSMNT_32BITINODES)
+		vfsp->vfs_flag |= VFS_32BITINODES;
+
 	if (args->flags2)
 		args->flags |= XFSMNT_FLAGS2;
 	return 0;
@@ -1929,15 +1932,15 @@
 		seq_printf(m, "," MNTOPT_SWIDTH "=%d",
 				(int)XFS_FSB_TO_BB(mp, mp->m_swidth));
 
-	if (!(mp->m_flags & XFS_MOUNT_32BITINOOPT))
-		seq_printf(m, "," MNTOPT_64BITINODE);
-
 	if (!(mp->m_flags & XFS_MOUNT_COMPAT_ATTR))
 		seq_printf(m, "," MNTOPT_ATTR2);
 
 	if (!(mp->m_flags & XFS_MOUNT_COMPAT_IOSIZE))
 		seq_printf(m, "," MNTOPT_LARGEIO);
 
+	if (!(vfsp->vfs_flag & VFS_32BITINODES))
+		seq_printf(m, "," MNTOPT_64BITINODE);
+
 	if (vfsp->vfs_flag & VFS_GRPID)
 		seq_printf(m, "," MNTOPT_GRPID);