]> www.infradead.org Git - users/willy/xarray.git/commit
ext4: propagate errors from ext4_find_extent() in ext4_insert_range()
authorBaokun Li <libaokun1@huawei.com>
Thu, 22 Aug 2024 02:35:30 +0000 (10:35 +0800)
committerTheodore Ts'o <tytso@mit.edu>
Wed, 4 Sep 2024 02:12:17 +0000 (22:12 -0400)
commit369c944ed1d7c3fb7b35f24e4735761153afe7b3
treeeae2abbd9573a20035b55fb8da7347a252170d34
parent6c2b3246cd0b951338c54b10f8ca13c59a41c86a
ext4: propagate errors from ext4_find_extent() in ext4_insert_range()

Even though ext4_find_extent() returns an error, ext4_insert_range() still
returns 0. This may confuse the user as to why fallocate returns success,
but the contents of the file are not as expected. So propagate the error
returned by ext4_find_extent() to avoid inconsistencies.

Fixes: 331573febb6a ("ext4: Add support FALLOC_FL_INSERT_RANGE for fallocate")
Cc: stable@kernel.org
Signed-off-by: Baokun Li <libaokun1@huawei.com>
Reviewed-by: Jan Kara <jack@suse.cz>
Reviewed-by: Ojaswin Mujoo <ojaswin@linux.ibm.com>
Tested-by: Ojaswin Mujoo <ojaswin@linux.ibm.com>
Link: https://patch.msgid.link/20240822023545.1994557-11-libaokun@huaweicloud.com
Signed-off-by: Theodore Ts'o <tytso@mit.edu>
fs/ext4/extents.c