aboutsummaryrefslogtreecommitdiffstats
path: root/fs/ext4
diff options
context:
space:
mode:
authorTheodore Ts'o <tytso@mit.edu>2014-03-13 22:49:42 -0400
committerTheodore Ts'o <tytso@mit.edu>2014-03-13 22:49:42 -0400
commit38c03b34391dd25a39576073e58485e5949d29fe (patch)
tree91236e16c5d4534667aa04367c9be86cebc22af8 /fs/ext4
parent02b9984d640873b7b3809e63f81a0d7e13496886 (diff)
ext4: only call sync_filesystm() when remounting read-only
This is the only time it is required for ext4. Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
Diffstat (limited to 'fs/ext4')
-rw-r--r--fs/ext4/super.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/fs/ext4/super.c b/fs/ext4/super.c
index a5f1170048bd..89baee42f353 100644
--- a/fs/ext4/super.c
+++ b/fs/ext4/super.c
@@ -4765,8 +4765,6 @@ static int ext4_remount(struct super_block *sb, int *flags, char *data)
4765#endif 4765#endif
4766 char *orig_data = kstrdup(data, GFP_KERNEL); 4766 char *orig_data = kstrdup(data, GFP_KERNEL);
4767 4767
4768 sync_filesystem(sb);
4769
4770 /* Store the original options */ 4768 /* Store the original options */
4771 old_sb_flags = sb->s_flags; 4769 old_sb_flags = sb->s_flags;
4772 old_opts.s_mount_opt = sbi->s_mount_opt; 4770 old_opts.s_mount_opt = sbi->s_mount_opt;
@@ -4837,6 +4835,9 @@ static int ext4_remount(struct super_block *sb, int *flags, char *data)
4837 } 4835 }
4838 4836
4839 if (*flags & MS_RDONLY) { 4837 if (*flags & MS_RDONLY) {
4838 err = sync_filesystem(sb);
4839 if (err < 0)
4840 goto restore_opts;
4840 err = dquot_suspend(sb, -1); 4841 err = dquot_suspend(sb, -1);
4841 if (err < 0) 4842 if (err < 0)
4842 goto restore_opts; 4843 goto restore_opts;