]> git.ipfire.org Git - thirdparty/linux.git/commitdiff
f2fs: fix to show simulate_lock_timeout correctly
authorChao Yu <chao@kernel.org>
Tue, 20 Jan 2026 09:18:26 +0000 (17:18 +0800)
committerJaegeuk Kim <jaegeuk@kernel.org>
Tue, 27 Jan 2026 02:45:58 +0000 (02:45 +0000)
Commit d36de29f4bb5 ("f2fs: sysfs: introduce inject_lock_timeout")
introduces a bug as below, fix it.

cat /sys/fs/f2fs/vdx/inject_lock_timeout
s/fs/f2fs/vdx/inject_lock_timeout: Invalid argument

Signed-off-by: Chao Yu <chao@kernel.org>
Signed-off-by: Jaegeuk Kim <jaegeuk@kernel.org>
fs/f2fs/sysfs.c

index cd22bfe75c4568e66c4a45c54392cdeb0ecf35a8..d01a2664a2508a6123e3345e4bfff3949c8d3e19 100644 (file)
@@ -86,7 +86,8 @@ static unsigned char *__struct_ptr(struct f2fs_sb_info *sbi, int struct_type)
                return (unsigned char *)sbi;
 #ifdef CONFIG_F2FS_FAULT_INJECTION
        else if (struct_type == FAULT_INFO_RATE ||
-                                       struct_type == FAULT_INFO_TYPE)
+               struct_type == FAULT_INFO_TYPE ||
+               struct_type == FAULT_INFO_TIMEOUT)
                return (unsigned char *)&F2FS_OPTION(sbi).fault_info;
 #endif
 #ifdef CONFIG_F2FS_STAT_FS