[PATCH 4.19 028/220] f2fs: keep lazytime on remount
From: Greg Kroah-Hartman
Date: Fri Nov 22 2019 - 05:57:45 EST
From: Jaegeuk Kim <jaegeuk@xxxxxxxxxx>
[ Upstream commit 095680f24f2673d860fd1d3d2f54f40f330b4c63 ]
This patch fixes losing lazytime when remounting f2fs.
Reviewed-by: Chao Yu <yuchao0@xxxxxxxxxx>
Signed-off-by: Jaegeuk Kim <jaegeuk@xxxxxxxxxx>
Signed-off-by: Sasha Levin <sashal@xxxxxxxxxx>
---
fs/f2fs/super.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/fs/f2fs/super.c b/fs/f2fs/super.c
index b05e10c332b7e..15779123d0895 100644
--- a/fs/f2fs/super.c
+++ b/fs/f2fs/super.c
@@ -1556,6 +1556,7 @@ static int f2fs_remount(struct super_block *sb, int *flags, char *data)
(test_opt(sbi, POSIX_ACL) ? SB_POSIXACL : 0);
limit_reserve_root(sbi);
+ *flags = (*flags & ~SB_LAZYTIME) | (sb->s_flags & SB_LAZYTIME);
return 0;
restore_gc:
if (need_restart_gc) {
--
2.20.1