@@ -592,7 +592,13 @@ iomap_read_page_sync(struct inode *inode, loff_t block_start, struct page *page,
if (iomap->type != IOMAP_MAPPED || block_start >= i_size_read(inode)) {
zero_user_segments(page, poff, from, to, poff + plen);
- iomap_set_range_uptodate(page, poff, plen);
+ /*
+ * if this is zero-around, we don't want to mark the page
+ * uptodate here because this is only a partial page zeroing
+ * and there's still more data to be written into the page.
+ */
+ if (!(iomap->flags & IOMAP_F_ZERO_AROUND))
+ iomap_set_range_uptodate(page, poff, plen);
return 0;
}