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
file.c
ialloc.c
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
super.c
symlink.c
trace.c
trace.h
xattr_security.c
xattr_trusted.c
xattr_user.c
xattr.c
xattr.h