ext4: return -EINVAL on hole in ext4_convert_unwritten_extents_atomic()
We should ideally never encounter a hole during the endio conversion as
that indicates something is wrong with our extent handling. Still if we do
find a hole at atomic write endio, ext4_map_blocks() returns 0 which would
be returned back to callers by ext4_convert_unwritten_extents_atomic().
This can be wrongly interpreted as a success. Fix this by bailing out with
-EINVAL instead.
Signed-off-by: Ojaswin Mujoo <ojaswin@linux.ibm.com>
Reviewed-by: Jan Kara <jack@suse.cz>
Reviewed-by: Zhang Yi <yi.zhang@huawei.com>
Link: https://patch.msgid.link/20261023-ext4-atomic-endio-fix-b4-v1-1-f91feb0b9613@linux.ibm.com
Signed-off-by: Theodore Ts'o <tytso@mit.edu>
Cc: stable@kernel.org
1 file changed