VisionFive2 Linux kernel

StarFive Tech Linux Kernel for VisionFive (JH7110) boards (mirror)

More than 9999 Commits   32 Branches   54 Tags
author: Andreas Gruenbacher <agruenba@redhat.com> 2020-09-10 08:26:16 -0700 committer: Darrick J. Wong <darrick.wong@oracle.com> 2020-09-10 08:26:16 -0700 commit: c114bbc6c423a449a00780d2d6633432c0a0505f parent: a805c111650cdba6ee880f528abdd03c1af82089
Commit Summary:
iomap: Fix direct I/O write consistency check
Diffstat:
1 file changed, 1 insertion, 1 deletion
diff --git a/fs/iomap/direct-io.c b/fs/iomap/direct-io.c
index 9519113ebc35..024d4bb3028e 100644
--- a/fs/iomap/direct-io.c
+++ b/fs/iomap/direct-io.c
@@ -108,7 +108,7 @@ static ssize_t iomap_dio_complete(struct iomap_dio *dio)
 	 * ->end_io() when necessary, otherwise a racing buffer read would cache
 	 * zeros from unwritten extents.
 	 */
-	if (!dio->error &&
+	if (!dio->error && dio->size &&
 	    (dio->flags & IOMAP_DIO_WRITE) && inode->i_mapping->nrpages) {
 		int err;
 		err = invalidate_inode_pages2_range(inode->i_mapping,