]> git.ipfire.org Git - thirdparty/kernel/linux.git/commitdiff
f2fs: change seq_file_ra_mul and max_io_bytes to unsigned int
authorYongpeng Yang <yangyongpeng@xiaomi.com>
Wed, 7 Jan 2026 02:33:47 +0000 (10:33 +0800)
committerJaegeuk Kim <jaegeuk@kernel.org>
Wed, 7 Jan 2026 03:17:09 +0000 (03:17 +0000)
{struct file_ra_state}->ra_pages and {struct bio}->bi_iter.bi_size is
defined as unsigned int, so values of seq_file_ra_mul and max_io_bytes
exceeding UINT_MAX are meaningless.

Signed-off-by: Yongpeng Yang <yangyongpeng@xiaomi.com>
Reviewed-by: Chao Yu <chao@kernel.org>
Signed-off-by: Jaegeuk Kim <jaegeuk@kernel.org>
fs/f2fs/f2fs.h

index 399514187280bf584ae303a8d9f9c11ae1528893..ded41b416ed7d7a1b3550e55f5a933cbc94799a3 100644 (file)
@@ -1808,7 +1808,7 @@ struct f2fs_sb_info {
        unsigned int total_valid_node_count;    /* valid node block count */
        int dir_level;                          /* directory level */
        bool readdir_ra;                        /* readahead inode in readdir */
-       u64 max_io_bytes;                       /* max io bytes to merge IOs */
+       unsigned int max_io_bytes;              /* max io bytes to merge IOs */
 
        block_t user_block_count;               /* # of user blocks */
        block_t total_valid_block_count;        /* # of valid blocks */
@@ -1956,7 +1956,7 @@ struct f2fs_sb_info {
        unsigned int gc_segment_mode;           /* GC state for reclaimed segments */
        unsigned int gc_reclaimed_segs[MAX_GC_MODE];    /* Reclaimed segs for each mode */
 
-       unsigned long seq_file_ra_mul;          /* multiplier for ra_pages of seq. files in fadvise */
+       unsigned int seq_file_ra_mul;           /* multiplier for ra_pages of seq. files in fadvise */
 
        int max_fragment_chunk;                 /* max chunk size for block fragmentation mode */
        int max_fragment_hole;                  /* max hole size for block fragmentation mode */