linux-stable/fs/ext2
Wei Gao 6436e2c790 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:40:56 +02:00
..
acl.c
acl.h
balloc.c
dir.c
ext2.h ext2: convert to the new mount API 2025-02-24 17:02:37 +01:00
file.c
ialloc.c
inode.c ext2: Handle fiemap on empty files to prevent EINVAL 2025-08-20 18:40:56 +02:00
ioctl.c
Kconfig
Makefile
namei.c Change inode_operations.mkdir to return struct dentry * 2025-02-27 20:00:17 +01:00
super.c ext2: Deprecate DAX 2025-04-29 13:08:20 +02:00
symlink.c
trace.c
trace.h
xattr_security.c
xattr_trusted.c
xattr_user.c
xattr.c
xattr.h