+2
−4
Loading
For file-backed mount, IO requests are handled by vfs_iocb_iter_read().
However, it can be interrupted by SIGKILL, returning the number of
bytes actually copied. Unused folios in bio are unexpectedly marked
as uptodate.
vfs_read
filemap_read
filemap_get_pages
filemap_readahead
erofs_fileio_readahead
erofs_fileio_rq_submit
vfs_iocb_iter_read
filemap_read
filemap_get_pages <= detect signal
erofs_fileio_ki_complete <= set all folios uptodate
This patch addresses this by setting short read bio with an error
directly.
Fixes: bc804a8d ("erofs: handle end of filesystem properly for file-backed mounts")
Reported-by:
chenguanyou <chenguanyou@xiaomi.com>
Signed-off-by:
Yunlei He <heyunlei@xiaomi.com>
Signed-off-by:
Sheng Yong <shengyong1@xiaomi.com>
Reviewed-by:
Gao Xiang <hsiangkao@linux.alibaba.com>
Reviewed-by:
Chao Yu <chao@kernel.org>
Signed-off-by:
Gao Xiang <hsiangkao@linux.alibaba.com>