diff options
author | Christoph Hellwig <hch@infradead.org> | 2008-05-19 21:30:39 -0400 |
---|---|---|
committer | Niv Sardi <xaiki@debian.org> | 2008-07-28 02:58:17 -0400 |
commit | 48b62a1a97f118a5a71ae9222bc6d3481d6b757b (patch) | |
tree | 24058bfcd5c65ed3d08b3090c062670d8aed7708 /fs | |
parent | fa6adbe08825274a3803abb9aef365f939be7da5 (diff) |
[XFS] merge xfs_mntupdate into xfs_fs_remount
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>
Diffstat (limited to 'fs')
-rw-r--r-- | fs/xfs/linux-2.6/xfs_super.c | 23 | ||||
-rw-r--r-- | fs/xfs/xfs_vfsops.c | 24 | ||||
-rw-r--r-- | fs/xfs/xfs_vfsops.h | 2 |
3 files changed, 21 insertions, 28 deletions
diff --git a/fs/xfs/linux-2.6/xfs_super.c b/fs/xfs/linux-2.6/xfs_super.c index 5c7144bc3106..a3ecdf442465 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 | } |
diff --git a/fs/xfs/xfs_vfsops.c b/fs/xfs/xfs_vfsops.c index a005cebf5041..e223aeab68be 100644 --- a/fs/xfs/xfs_vfsops.c +++ b/fs/xfs/xfs_vfsops.c | |||
@@ -701,30 +701,6 @@ xfs_attr_quiesce( | |||
701 | xfs_unmountfs_writesb(mp); | 701 | xfs_unmountfs_writesb(mp); |
702 | } | 702 | } |
703 | 703 | ||
704 | int | ||
705 | xfs_mntupdate( | ||
706 | struct xfs_mount *mp, | ||
707 | int *flags, | ||
708 | struct xfs_mount_args *args) | ||
709 | { | ||
710 | if (!(*flags & MS_RDONLY)) { /* rw/ro -> rw */ | ||
711 | if (mp->m_flags & XFS_MOUNT_RDONLY) | ||
712 | mp->m_flags &= ~XFS_MOUNT_RDONLY; | ||
713 | if (args->flags & XFSMNT_BARRIER) { | ||
714 | mp->m_flags |= XFS_MOUNT_BARRIER; | ||
715 | xfs_mountfs_check_barriers(mp); | ||
716 | } else { | ||
717 | mp->m_flags &= ~XFS_MOUNT_BARRIER; | ||
718 | } | ||
719 | } else if (!(mp->m_flags & XFS_MOUNT_RDONLY)) { /* rw -> ro */ | ||
720 | xfs_filestream_flush(mp); | ||
721 | xfs_sync(mp, SYNC_DATA_QUIESCE); | ||
722 | xfs_attr_quiesce(mp); | ||
723 | mp->m_flags |= XFS_MOUNT_RDONLY; | ||
724 | } | ||
725 | return 0; | ||
726 | } | ||
727 | |||
728 | /* | 704 | /* |
729 | * xfs_unmount_flush implements a set of flush operation on special | 705 | * xfs_unmount_flush implements a set of flush operation on special |
730 | * inodes, which are needed as a separate set of operations so that | 706 | * inodes, which are needed as a separate set of operations so that |
diff --git a/fs/xfs/xfs_vfsops.h b/fs/xfs/xfs_vfsops.h index 1688817c55ed..995091f19499 100644 --- a/fs/xfs/xfs_vfsops.h +++ b/fs/xfs/xfs_vfsops.h | |||
@@ -11,8 +11,6 @@ struct xfs_mount_args; | |||
11 | int xfs_mount(struct xfs_mount *mp, struct xfs_mount_args *args, | 11 | int xfs_mount(struct xfs_mount *mp, struct xfs_mount_args *args, |
12 | struct cred *credp); | 12 | struct cred *credp); |
13 | int xfs_unmount(struct xfs_mount *mp, int flags, struct cred *credp); | 13 | int xfs_unmount(struct xfs_mount *mp, int flags, struct cred *credp); |
14 | int xfs_mntupdate(struct xfs_mount *mp, int *flags, | ||
15 | struct xfs_mount_args *args); | ||
16 | int xfs_sync(struct xfs_mount *mp, int flags); | 14 | int xfs_sync(struct xfs_mount *mp, int flags); |
17 | void xfs_do_force_shutdown(struct xfs_mount *mp, int flags, char *fname, | 15 | void xfs_do_force_shutdown(struct xfs_mount *mp, int flags, char *fname, |
18 | int lnnum); | 16 | int lnnum); |