erofs: set error to bio if file-backed IO fails
authorSheng Yong <shengyong1@xiaomi.com>
Tue, 8 Apr 2025 12:23:50 +0000 (20:23 +0800)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Sun, 20 Apr 2025 08:15:28 +0000 (10:15 +0200)
commit7b9bdd705911468cd4ec847de8e5fdfc95eabdbf
tree8281a7748e129bc8da53dcb0caa23f2608fc7b03
parent61f590c6771b48e1b96b8b55297dcb168623a7b2
erofs: set error to bio if file-backed IO fails

[ Upstream commit 1595f15391b81815e4ef91c339991913d556c1b6 ]

If a file-backed IO fails before submitting the bio to the lower
filesystem, an error is returned, but the bio->bi_status is not
marked as an error. However, the error information should be passed
to the end_io handler. Otherwise, the IO request will be treated as
successful.

Fixes: 283213718f5d ("erofs: support compressed inodes for fileio")
Signed-off-by: Sheng Yong <shengyong1@xiaomi.com>
Reviewed-by: Gao Xiang <hsiangkao@linux.alibaba.com>
Link: https://lore.kernel.org/r/20250408122351.2104507-1-shengyong1@xiaomi.com
Signed-off-by: Gao Xiang <hsiangkao@linux.alibaba.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
fs/erofs/fileio.c