]> www.pilppa.org Git - linux-2.6-omap-h63xx.git/commitdiff
[XFS] merge xfs_mntupdate into xfs_fs_remount
authorChristoph Hellwig <hch@infradead.org>
Tue, 20 May 2008 01:30:39 +0000 (11:30 +1000)
committerNiv Sardi <xaiki@debian.org>
Mon, 28 Jul 2008 06:58:17 +0000 (16:58 +1000)
xfs_mntupdate already is completely Linux specific due to the VFS flags
passed in, so it might aswell be merged into xfs_fs_remount.

SGI-PV: 981498
SGI-Modid: xfs-linux-melb:xfs-kern:31185a

Signed-off-by: Christoph Hellwig <hch@infradead.org>
Signed-off-by: David Chinner <dgc@sgi.com>
Signed-off-by: Lachlan McIlroy <lachlan@sgi.com>
fs/xfs/linux-2.6/xfs_super.c
fs/xfs/xfs_vfsops.c
fs/xfs/xfs_vfsops.h

index 5c7144bc3106ac82b7fa57bb0a69d036eef224db..a3ecdf44246585fe33b45341ace0c7329cbbf8b0 100644 (file)
@@ -52,6 +52,7 @@
 #include "xfs_version.h"
 #include "xfs_log_priv.h"
 #include "xfs_trans_priv.h"
+#include "xfs_filestream.h"
 
 #include <linux/namei.h>
 #include <linux/init.h>
@@ -1220,8 +1221,26 @@ xfs_fs_remount(
        int                     error;
 
        error = xfs_parseargs(mp, options, args, 1);
-       if (!error)
-               error = xfs_mntupdate(mp, flags, args);
+       if (error)
+               goto out_free_args;
+
+       if (!(*flags & MS_RDONLY)) {                    /* rw/ro -> rw */
+               if (mp->m_flags & XFS_MOUNT_RDONLY)
+               mp->m_flags &= ~XFS_MOUNT_RDONLY;
+               if (args->flags & XFSMNT_BARRIER) {
+                       mp->m_flags |= XFS_MOUNT_BARRIER;
+                       xfs_mountfs_check_barriers(mp);
+               } else {
+                       mp->m_flags &= ~XFS_MOUNT_BARRIER;
+               }
+       } else if (!(mp->m_flags & XFS_MOUNT_RDONLY)) { /* rw -> ro */
+               xfs_filestream_flush(mp);
+               xfs_sync(mp, SYNC_DATA_QUIESCE);
+               xfs_attr_quiesce(mp);
+               mp->m_flags |= XFS_MOUNT_RDONLY;
+       }
+
+ out_free_args:
        kmem_free(args);
        return -error;
 }
index a005cebf50412437c958d35a0caabd4a0337a24e..e223aeab68be3cedcea96f8222c50da268d7f26e 100644 (file)
@@ -701,30 +701,6 @@ xfs_attr_quiesce(
        xfs_unmountfs_writesb(mp);
 }
 
-int
-xfs_mntupdate(
-       struct xfs_mount                *mp,
-       int                             *flags,
-       struct xfs_mount_args           *args)
-{
-       if (!(*flags & MS_RDONLY)) {                    /* rw/ro -> rw */
-               if (mp->m_flags & XFS_MOUNT_RDONLY)
-                       mp->m_flags &= ~XFS_MOUNT_RDONLY;
-               if (args->flags & XFSMNT_BARRIER) {
-                       mp->m_flags |= XFS_MOUNT_BARRIER;
-                       xfs_mountfs_check_barriers(mp);
-               } else {
-                       mp->m_flags &= ~XFS_MOUNT_BARRIER;
-               }
-       } else if (!(mp->m_flags & XFS_MOUNT_RDONLY)) { /* rw -> ro */
-               xfs_filestream_flush(mp);
-               xfs_sync(mp, SYNC_DATA_QUIESCE);
-               xfs_attr_quiesce(mp);
-               mp->m_flags |= XFS_MOUNT_RDONLY;
-       }
-       return 0;
-}
-
 /*
  * xfs_unmount_flush implements a set of flush operation on special
  * inodes, which are needed as a separate set of operations so that
index 1688817c55ed358adeb13a31a04acf05486040a5..995091f19499dae4f99023ea9419b545afeb22cc 100644 (file)
@@ -11,8 +11,6 @@ struct xfs_mount_args;
 int xfs_mount(struct xfs_mount *mp, struct xfs_mount_args *args,
                struct cred *credp);
 int xfs_unmount(struct xfs_mount *mp, int flags, struct cred *credp);
-int xfs_mntupdate(struct xfs_mount *mp, int *flags,
-               struct xfs_mount_args *args);
 int xfs_sync(struct xfs_mount *mp, int flags);
 void xfs_do_force_shutdown(struct xfs_mount *mp, int flags, char *fname,
                int lnnum);