Files
linux-stable-mirror/fs
Eric Sandeen 611015122d exfat: short-circuit zero-byte writes in exfat_file_write_iter
[ Upstream commit fda94a9919 ]

When generic_write_checks() returns zero, it means that
iov_iter_count() is zero, and there is no work to do.

Simply return success like all other filesystems do, rather than
proceeding down the write path, which today yields an -EFAULT in
generic_perform_write() via the
(fault_in_iov_iter_readable(i, bytes) == bytes) check when bytes
== 0.

Fixes: 11a347fb6c ("exfat: change to get file size from DataLength")
Reported-by: Noah <kernel-org-10@maxgrass.eu>
Signed-off-by: Eric Sandeen <sandeen@redhat.com>
Reviewed-by: Yuezhang Mo <Yuezhang.Mo@sony.com>
Signed-off-by: Namjae Jeon <linkinjeon@kernel.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
2025-03-13 13:02:08 +01:00
..
2024-10-17 00:28:06 -07:00
2025-01-23 17:22:54 +01:00
2024-12-14 20:04:14 +01:00
2025-02-08 09:56:51 +01:00
2025-01-23 17:22:55 +01:00
2025-03-13 13:01:51 +01:00
2024-12-05 14:02:47 +01:00
2025-01-17 13:40:50 +01:00