aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorStefan Roesch <[email protected]>2022-06-23 10:51:49 -0700
committerJens Axboe <[email protected]>2022-07-24 18:39:31 -0600
commit18e419f6e80a6d3c8aaab94abd55c3b41741d8df (patch)
tree4ad6deedf683742296827c66d511affffbf0fff5
parentcae2de6978915991a564e3c5c69b66b629c031af (diff)
iomap: Return -EAGAIN from iomap_write_iter()
If iomap_write_iter() encounters -EAGAIN, return -EAGAIN to the caller. Signed-off-by: Stefan Roesch <[email protected]> Reviewed-by: Darrick J. Wong <[email protected]> Link: https://lore.kernel.org/r/[email protected] Reviewed-by: Christoph Hellwig <[email protected]> [axboe: make the suggested ternary edit] Signed-off-by: Jens Axboe <[email protected]>
-rw-r--r--fs/iomap/buffered-io.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/fs/iomap/buffered-io.c b/fs/iomap/buffered-io.c
index 83cf093fcb92..c681eacc389b 100644
--- a/fs/iomap/buffered-io.c
+++ b/fs/iomap/buffered-io.c
@@ -830,6 +830,10 @@ again:
length -= status;
} while (iov_iter_count(i) && length);
+ if (status == -EAGAIN) {
+ iov_iter_revert(i, written);
+ return -EAGAIN;
+ }
return written ? written : status;
}