linux/fs/f2fs
Chao Yu 0e75a098b0 f2fs: fix to avoid overflow while left shift operation
[ Upstream commit 0fe1c6bec5 ]

Should cast type of folio->index from pgoff_t to loff_t to avoid overflow
while left shift operation.

Fixes: 3265d3db1f ("f2fs: support partial truncation on compressed inode")
Signed-off-by: Chao Yu <chao@kernel.org>
Signed-off-by: Jaegeuk Kim <jaegeuk@kernel.org>
[ Modification: Using rpages[i]->index instead of folio->index due to
it was changed since commit:1cda5bc0b2fe ("f2fs: Use a folio in
f2fs_truncate_partial_cluster()") on 6.14 ]
Signed-off-by: Rajani Kantha <681739313@139.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
History 2025-11-24 10:35:56 +01:00
..
acl.c f2fs: Use in_group_or_capable() helper 2024-06-25 11:15:48 +02:00
acl.h fs: port ->set_acl() to pass mnt_idmap 2023-01-19 09:24:27 +01:00
checkpoint.c Revert "f2fs: rebuild nat_bits during umount" 2025-04-20 10:15:20 +02:00
compress.c f2fs: fix to avoid overflow while left shift operation 2025-11-24 10:35:56 +01:00
data.c f2fs: fix wrong block mapping for multi-devices 2025-10-23 16:20:19 +02:00
debug.c f2fs: clean up val{>>,<<}F2FS_BLKSIZE_BITS 2024-08-21 00:56:27 +00:00
dir.c f2fs: Introduce linear search for dentries 2025-02-08 09:58:11 +01:00
extent_cache.c f2fs: fix infinite loop in __insert_extent_tree() 2025-11-13 15:34:26 -05:00
f2fs.h f2fs: fix condition in __allow_reserved_blocks() 2025-10-15 12:00:04 +02:00
file.c f2fs: fix to avoid panic once fallocation fails for pinfile 2025-11-02 22:15:22 +09:00
gc.c f2fs: turn off one_time when forcibly set to foreground GC 2025-08-15 12:14:00 +02:00
gc.h f2fs: decrease spare area for pinned files for zoned devices 2025-07-10 16:04:59 +02:00
hash.c f2fs: don't use casefolded comparison for "." and ".." 2022-05-17 11:19:23 -07:00
inline.c f2fs: Introduce linear search for dentries 2025-02-08 09:58:11 +01:00
inode.c f2fs: fix to avoid panic in f2fs_evict_inode 2025-08-15 12:14:01 +02:00
iostat.c f2fs: add async reset zone command support 2023-06-12 13:04:09 -07:00
iostat.h f2fs: use iostat_lat_type directly as a parameter in the iostat_update_and_unbind_ctx() 2023-02-07 10:39:28 -08:00
Kconfig fs: add CONFIG_BUFFER_HEAD 2023-08-02 09:13:09 -06:00
Makefile f2fs: separate out iostat feature 2021-08-23 10:25:51 -07:00
namei.c f2fs: prevent kernel warning due to negative i_nlink from corrupted image 2025-06-27 11:11:21 +01:00
node.c f2fs: fix to detect potential corrupted nid in free_nid_list 2025-11-13 15:34:14 -05:00
node.h f2fs: use BLKS_PER_SEG, BLKS_PER_SEC, and SEGS_PER_SEC 2024-02-27 09:41:12 -08:00
recovery.c move asm/unaligned.h to linux/unaligned.h 2024-10-02 17:23:23 -04:00
segment.c f2fs: fix to avoid panic once fallocation fails for pinfile 2025-11-02 22:15:22 +09:00
segment.h f2fs: fix to calculate dirty data during has_not_enough_free_secs() 2025-08-15 12:14:01 +02:00
shrinker.c f2fs: add block_age-based extent cache 2022-12-12 14:53:56 -08:00
super.c f2fs: fix bio memleak when committing super block 2025-08-15 12:14:00 +02:00
sysfs.c f2fs: fix wrong layout information on 16KB page 2025-11-13 15:34:21 -05:00
verity.c f2fs-6.12-rc1 2024-09-24 15:12:38 -07:00
xattr.c f2fs: reduce expensive checkpoint trigger frequency 2024-08-15 15:26:39 +00:00
xattr.h f2fs: move f2fs_xattr_handlers and f2fs_xattr_handler_map to .rodata 2023-10-09 16:24:18 +02:00