summaryrefslogtreecommitdiff
path: root/fs/iomap
diff options
context:
space:
mode:
Diffstat (limited to 'fs/iomap')
-rw-r--r--fs/iomap/buffered-io.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/fs/iomap/buffered-io.c b/fs/iomap/buffered-io.c
index ac040d607f4f..49279dfa73c9 100644
--- a/fs/iomap/buffered-io.c
+++ b/fs/iomap/buffered-io.c
@@ -895,8 +895,8 @@ static loff_t iomap_zero_iter(struct iomap_iter *iter, bool *did_zero)
mark_page_accessed(page);
bytes = iomap_write_end(iter, pos, bytes, bytes, page);
- if (bytes < 0)
- return bytes;
+ if (WARN_ON_ONCE(bytes == 0))
+ return -EIO;
pos += bytes;
length -= bytes;