linux-yocto/fs/ext2
Wei Gao c8e0967400 ext2: Handle fiemap on empty files to prevent EINVAL
[ Upstream commit a099b09a33 ]

Previously, ext2_fiemap would unconditionally apply "len = min_t(u64, len,
i_size_read(inode));", When inode->i_size was 0 (for an empty file), this
would reduce the requested len to 0. Passing len = 0 to iomap_fiemap could
then result in an -EINVAL error, even for valid queries on empty files.

Link: https://github.com/linux-test-project/ltp/issues/1246
Signed-off-by: Wei Gao <wegao@suse.com>
Signed-off-by: Jan Kara <jack@suse.cz>
Link: https://patch.msgid.link/20250613152402.3432135-1-wegao@suse.com
Signed-off-by: Sasha Levin <sashal@kernel.org>
2025-08-20 18:30:21 +02:00
..
acl.c
acl.h
balloc.c ext2: Verify bitmap and itable block numbers before using them 2024-06-26 12:54:11 +02:00
dir.c vfs-6.12.file 2024-09-16 09:14:02 +02:00
ext2.h quota: Properly annotate i_dquot arrays with __rcu 2024-02-08 12:04:59 +01:00
file.c ext2: set FMODE_CAN_ODIRECT instead of a dummy direct_IO method 2024-04-04 16:27:54 +02:00
ialloc.c ext2: convert to new timestamp accessors 2023-10-18 13:26:21 +02:00
inode.c ext2: Handle fiemap on empty files to prevent EINVAL 2025-08-20 18:30:21 +02:00
ioctl.c
Kconfig ext2: Remove LEGACY_DIRECT_IO dependency 2024-05-03 11:50:28 +02:00
Makefile
namei.c ext2: Avoid reading renamed directory if parent does not change 2023-11-25 02:53:20 -05:00
super.c \n 2024-03-13 14:30:58 -07:00
symlink.c
trace.c
trace.h
xattr_security.c
xattr_trusted.c
xattr_user.c
xattr.c ext2: Remove GFP_NOFS use in ext2_xattr_cache_insert() 2024-01-23 19:21:11 +01:00
xattr.h ext2: move ext2_xattr_handlers and ext2_xattr_handler_map to .rodata 2023-10-09 16:24:18 +02:00