]> git.hungrycats.org Git - linux/commitdiff
Revert "f2fs: remove unreachable lazytime mount option parsing"
authorJaegeuk Kim <jaegeuk@kernel.org>
Tue, 12 Nov 2024 01:04:58 +0000 (01:04 +0000)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Thu, 5 Dec 2024 12:54:15 +0000 (13:54 +0100)
commit acff9409dd40beaca2bd982678d222e2740ad84b upstream.

This reverts commit 54f43a10fa257ad4af02a1d157fefef6ebcfa7dc.

The above commit broke the lazytime mount, given

mount("/dev/vdb", "/mnt/test", "f2fs", 0, "lazytime");

CC: stable@vger.kernel.org # 6.11+
Signed-off-by: Daniel Rosenberg <drosen@google.com>
Reviewed-by: Chao Yu <chao@kernel.org>
Signed-off-by: Jaegeuk Kim <jaegeuk@kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
fs/f2fs/super.c

index dc569587e8b96d02a153400f47076ffce27ce770..7e687bd0622661ea0db67f4c5b969b0f446bea99 100644 (file)
@@ -151,6 +151,8 @@ enum {
        Opt_mode,
        Opt_fault_injection,
        Opt_fault_type,
+       Opt_lazytime,
+       Opt_nolazytime,
        Opt_quota,
        Opt_noquota,
        Opt_usrquota,
@@ -227,6 +229,8 @@ static match_table_t f2fs_tokens = {
        {Opt_mode, "mode=%s"},
        {Opt_fault_injection, "fault_injection=%u"},
        {Opt_fault_type, "fault_type=%u"},
+       {Opt_lazytime, "lazytime"},
+       {Opt_nolazytime, "nolazytime"},
        {Opt_quota, "quota"},
        {Opt_noquota, "noquota"},
        {Opt_usrquota, "usrquota"},
@@ -919,6 +923,12 @@ static int parse_options(struct super_block *sb, char *options, bool is_remount)
                        f2fs_info(sbi, "fault_type options not supported");
                        break;
 #endif
+               case Opt_lazytime:
+                       sb->s_flags |= SB_LAZYTIME;
+                       break;
+               case Opt_nolazytime:
+                       sb->s_flags &= ~SB_LAZYTIME;
+                       break;
 #ifdef CONFIG_QUOTA
                case Opt_quota:
                case Opt_usrquota: