Fix regression introduced by previous remount fixup (pv#983964) - so options will
authortes.longdrop.melbourne.sgi.com <tes.longdrop.melbourne.sgi.com>
Fri, 15 Aug 2008 16:04:14 +0000 (16:04 +0000)
committertes.longdrop.melbourne.sgi.com <tes.longdrop.melbourne.sgi.com>
Fri, 15 Aug 2008 16:04:14 +0000 (16:04 +0000)
no longer wrongly be rejected on remount.

Logically we would return an error in xfs_fs_remount code
to prevent users from believing they might have changed
mount options using remount which can't be changed.

But unfortunately mount(8) adds all options from
mtab and fstab to the mount arguments in some cases
so we can't blindly reject options, but have to
check for each specified option if it actually
differs from the currently set option and only
reject it if that's the case.

Until that is implemented we return success for
every remount request, and silently ignore all
options that we can't actually change.

Signed-off-by: Christoph Hellwig <hch@lst.de>
Merge of xfs-linux-melb:xfs-kern:31908a by kenmcd.

  fix remount regression

fs/xfs/linux-2.6/xfs_super.c

index 4b42f47..c66c5fd 100644 (file)
@@ -1303,9 +1303,29 @@ xfs_fs_remount(
                        mp->m_flags &= ~XFS_MOUNT_BARRIER;
                        break;
                default:
+                       /*
+                        * Logically we would return an error here to prevent
+                        * users from believing they might have changed
+                        * mount options using remount which can't be changed.
+                        *
+                        * But unfortunately mount(8) adds all options from
+                        * mtab and fstab to the mount arguments in some cases
+                        * so we can't blindly reject options, but have to
+                        * check for each specified option if it actually
+                        * differs from the currently set option and only
+                        * reject it if that's the case.
+                        *
+                        * Until that is implemented we return success for
+                        * every remount request, and silently ignore all
+                        * options that we can't actually change.
+                        */
+#if 0
                        printk(KERN_INFO
        "XFS: mount option \"%s\" not supported for remount\n", p);
                        return -EINVAL;
+#else
+                       return 0;
+#endif
                }
        }