summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTheodore Ts'o <tytso@mit.edu>2015-06-23 11:03:54 -0400
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2015-08-03 09:29:00 -0700
commit1c1964376ab16bc80dc24db2972a9d8f9120c9a4 (patch)
treed2809406c2199fff55d160edfc8fbc3e970a55c6
parentc632b53d850c401b63d5a308b2faafa98d8140af (diff)
ext4: set lazytime on remount if MS_LAZYTIME is set by mount
commit a2fd66d069d86d793e9d39d4079b96f46d13f237 upstream. Newer versions of mount parse the lazytime feature and pass it to the mount system call via the flags field in the mount system call, removing the lazytime string from the mount options list. So we need to check for the presence of MS_LAZYTIME and set it in sb->s_flags in order for this flag to be set on a remount. Signed-off-by: Theodore Ts'o <tytso@mit.edu> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-rw-r--r--fs/ext4/super.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/fs/ext4/super.c b/fs/ext4/super.c
index 3ee91461aac2..ca12affdba96 100644
--- a/fs/ext4/super.c
+++ b/fs/ext4/super.c
@@ -4944,6 +4944,9 @@ static int ext4_remount(struct super_block *sb, int *flags, char *data)
set_task_ioprio(sbi->s_journal->j_task, journal_ioprio);
}
+ if (*flags & MS_LAZYTIME)
+ sb->s_flags |= MS_LAZYTIME;
+
if ((*flags & MS_RDONLY) != (sb->s_flags & MS_RDONLY)) {
if (sbi->s_mount_flags & EXT4_MF_FS_ABORTED) {
err = -EROFS;