f2fs: fix to limit gc_pin_file_threshold
authorChao Yu <chao@kernel.org>
Mon, 6 May 2024 10:45:38 +0000 (18:45 +0800)
committerJaegeuk Kim <jaegeuk@kernel.org>
Thu, 9 May 2024 01:03:44 +0000 (01:03 +0000)
commitc521a6ab4ad75fe0755f4cd923a84e1289153aa2
tree4030c2393f2c77c197e9120ba56f324f3feb2814
parent968c4f72b23c0c8f1e94e942eab89b8c5a3022e7
f2fs: fix to limit gc_pin_file_threshold

type of f2fs_inode.i_gc_failures, f2fs_inode_info.i_gc_failures, and
f2fs_sb_info.gc_pin_file_threshold is __le16, unsigned int, and u64,
so it will cause truncation during comparison and persistence.

Unifying variable of these three variables to unsigned short, and
add an upper boundary limitation for gc_pin_file_threshold.

Signed-off-by: Chao Yu <chao@kernel.org>
Signed-off-by: Jaegeuk Kim <jaegeuk@kernel.org>
Documentation/ABI/testing/sysfs-fs-f2fs
fs/f2fs/f2fs.h
fs/f2fs/file.c
fs/f2fs/gc.h
fs/f2fs/sysfs.c