projects
/
GitHub
/
moto-9609
/
android_kernel_motorola_exynos9610.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
02b9984
)
ext4: only call sync_filesystm() when remounting read-only
author
Theodore Ts'o
<tytso@mit.edu>
Fri, 14 Mar 2014 02:49:42 +0000
(22:49 -0400)
committer
Theodore Ts'o
<tytso@mit.edu>
Fri, 14 Mar 2014 02:49:42 +0000
(22:49 -0400)
This is the only time it is required for ext4.
Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
fs/ext4/super.c
patch
|
blob
|
blame
|
history
diff --git
a/fs/ext4/super.c
b/fs/ext4/super.c
index a5f1170048bd479f1069b4f255a0bba3c62ac07b..89baee42f35340809931aed907bcaa4da28e41bb 100644
(file)
--- 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)
#endif
char *orig_data = kstrdup(data, GFP_KERNEL);
- sync_filesystem(sb);
-
/* Store the original options */
old_sb_flags = sb->s_flags;
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)
}
if (*flags & MS_RDONLY) {
+ err = sync_filesystem(sb);
+ if (err < 0)
+ goto restore_opts;
err = dquot_suspend(sb, -1);
if (err < 0)
goto restore_opts;