mirror of
https://github.com/torvalds/linux.git
synced 2026-09-13 15:40:03 +02:00
block: use blkdev_iov_iter_get_pages status for errors
blkdev_iov_iter_get_pages() can return various error values, including EIO, EFAULT, and ENOMEM. Set the actual reported status so user space can know why an operation failed. Reviewed-by: Hannes Reinecke <hare@kernel.org> Reviewed-by: Christoph Hellwig <hch@lst.de> Signed-off-by: Keith Busch <kbusch@kernel.org> Link: https://patch.msgid.link/20260720201057.1862857-2-kbusch@meta.com Signed-off-by: Jens Axboe <axboe@kernel.dk>
This commit is contained in:
parent
f5098b6bae
commit
75ae18ca94
|
|
@ -218,7 +218,7 @@ static ssize_t __blkdev_direct_IO(struct kiocb *iocb, struct iov_iter *iter,
|
|||
|
||||
ret = blkdev_iov_iter_get_pages(bio, iter, bdev);
|
||||
if (unlikely(ret)) {
|
||||
bio_endio_status(bio, BLK_STS_IOERR);
|
||||
bio_endio_status(bio, errno_to_blk_status(ret));
|
||||
break;
|
||||
}
|
||||
if (iocb->ki_flags & IOCB_NOWAIT) {
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user