VisionFive2 Linux kernel

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

More than 9999 Commits   32 Branches   54 Tags
author: Matthew Wilcox (Oracle) <willy@infradead.org> 2020-09-25 11:16:53 -0700 committer: Darrick J. Wong <darrick.wong@oracle.com> 2020-09-28 08:47:01 -0700 commit: 4595a298d5563cf76c1d852970f162051fd1a7a6 parent: 81ee8e52a71c712dbe04994f1430cb4c88b87ad6
Commit Summary:
iomap: Set all uptodate bits for an Uptodate page
Diffstat:
1 file changed, 2 insertions, 0 deletions
diff --git a/fs/iomap/buffered-io.c b/fs/iomap/buffered-io.c
index 8b6cca7e34e4..8180061b9e16 100644
--- a/fs/iomap/buffered-io.c
+++ b/fs/iomap/buffered-io.c
@@ -60,6 +60,8 @@ iomap_page_create(struct inode *inode, struct page *page)
 	iop = kzalloc(struct_size(iop, uptodate, BITS_TO_LONGS(nr_blocks)),
 			GFP_NOFS | __GFP_NOFAIL);
 	spin_lock_init(&iop->uptodate_lock);
+	if (PageUptodate(page))
+		bitmap_fill(iop->uptodate, nr_blocks);
 	attach_page_private(page, iop);
 	return iop;
 }