Commit 18e419f6 authored by Stefan Roesch's avatar Stefan Roesch Committed by Jens Axboe

iomap: Return -EAGAIN from iomap_write_iter()

If iomap_write_iter() encounters -EAGAIN, return -EAGAIN to the caller.
Signed-off-by: default avatarStefan Roesch <shr@fb.com>
Reviewed-by: default avatarDarrick J. Wong <djwong@kernel.org>
Link: https://lore.kernel.org/r/20220623175157.1715274-7-shr@fb.comReviewed-by: default avatarChristoph Hellwig <hch@lst.de>
[axboe: make the suggested ternary edit]
Signed-off-by: default avatarJens Axboe <axboe@kernel.dk>
parent cae2de69
......@@ -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;
}
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment