aboutsummaryrefslogtreecommitdiffstats
path: root/fs/xfs/linux-2.6/xfs_super.c
diff options
context:
space:
mode:
Diffstat (limited to 'fs/xfs/linux-2.6/xfs_super.c')
-rw-r--r--fs/xfs/linux-2.6/xfs_super.c23
1 files changed, 21 insertions, 2 deletions
diff --git a/fs/xfs/linux-2.6/xfs_super.c b/fs/xfs/linux-2.6/xfs_super.c
index 5c7144bc310..a3ecdf44246 100644
--- a/fs/xfs/linux-2.6/xfs_super.c
+++ b/fs/xfs/linux-2.6/xfs_super.c
@@ -52,6 +52,7 @@
52#include "xfs_version.h" 52#include "xfs_version.h"
53#include "xfs_log_priv.h" 53#include "xfs_log_priv.h"
54#include "xfs_trans_priv.h" 54#include "xfs_trans_priv.h"
55#include "xfs_filestream.h"
55 56
56#include <linux/namei.h> 57#include <linux/namei.h>
57#include <linux/init.h> 58#include <linux/init.h>
@@ -1220,8 +1221,26 @@ xfs_fs_remount(
1220 int error; 1221 int error;
1221 1222
1222 error = xfs_parseargs(mp, options, args, 1); 1223 error = xfs_parseargs(mp, options, args, 1);
1223 if (!error) 1224 if (error)
1224 error = xfs_mntupdate(mp, flags, args); 1225 goto out_free_args;
1226
1227 if (!(*flags & MS_RDONLY)) { /* rw/ro -> rw */
1228 if (mp->m_flags & XFS_MOUNT_RDONLY)
1229 mp->m_flags &= ~XFS_MOUNT_RDONLY;
1230 if (args->flags & XFSMNT_BARRIER) {
1231 mp->m_flags |= XFS_MOUNT_BARRIER;
1232 xfs_mountfs_check_barriers(mp);
1233 } else {
1234 mp->m_flags &= ~XFS_MOUNT_BARRIER;
1235 }
1236 } else if (!(mp->m_flags & XFS_MOUNT_RDONLY)) { /* rw -> ro */
1237 xfs_filestream_flush(mp);
1238 xfs_sync(mp, SYNC_DATA_QUIESCE);
1239 xfs_attr_quiesce(mp);
1240 mp->m_flags |= XFS_MOUNT_RDONLY;
1241 }
1242
1243 out_free_args:
1225 kmem_free(args); 1244 kmem_free(args);
1226 return -error; 1245 return -error;
1227} 1246}