1 ext4: set lazytime on remount if MS_LAZYTIME is set by mount
3 Newer versions of mount parse the lazytime feature and pass it to the
4 mount system call via the flags field in the mount system call,
5 removing the lazytime string from the mount options list. So we need
6 to check for the presence of MS_LAZYTIME and set it in sb->s_flags in
7 order for this flag to be set on a remount.
9 Signed-off-by: Theodore Ts'o <tytso@mit.edu>
10 Cc: stable@vger.kernel.org
12 fs/ext4/super.c | 3 +++
13 1 file changed, 3 insertions(+)
15 diff --git a/fs/ext4/super.c b/fs/ext4/super.c
16 index bd4df9d..90ec13f 100644
19 @@ -4971,6 +4971,9 @@ static int ext4_remount(struct super_block *sb, int *flags, char *data)
20 set_task_ioprio(sbi->s_journal->j_task, journal_ioprio);
23 + if (*flags & MS_LAZYTIME)
24 + sb->s_flags |= MS_LAZYTIME;
26 if ((*flags & MS_RDONLY) != (sb->s_flags & MS_RDONLY)) {
27 if (sbi->s_mount_flags & EXT4_MF_FS_ABORTED) {