mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
synced 2026-05-09 07:51:16 -04:00
iomap: Return -EAGAIN from iomap_write_iter()
If iomap_write_iter() encounters -EAGAIN, return -EAGAIN to the caller. Signed-off-by: Stefan Roesch <shr@fb.com> Reviewed-by: Darrick J. Wong <djwong@kernel.org> Link: https://lore.kernel.org/r/20220623175157.1715274-7-shr@fb.com Reviewed-by: Christoph Hellwig <hch@lst.de> [axboe: make the suggested ternary edit] Signed-off-by: Jens Axboe <axboe@kernel.dk>
This commit is contained in:
committed by
Jens Axboe
parent
cae2de6978
commit
18e419f6e8
@@ -830,6 +830,10 @@ static loff_t iomap_write_iter(struct iomap_iter *iter, struct iov_iter *i)
|
||||
length -= status;
|
||||
} while (iov_iter_count(i) && length);
|
||||
|
||||
if (status == -EAGAIN) {
|
||||
iov_iter_revert(i, written);
|
||||
return -EAGAIN;
|
||||
}
|
||||
return written ? written : status;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user