We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 906d278 commit ef18a1cCopy full SHA for ef18a1c
mm/truncate.c
@@ -592,6 +592,16 @@ unsigned long invalidate_mapping_pages(struct address_space *mapping,
592
unlock_page(page);
593
continue;
594
}
595
+
596
+ /* Take a pin outside pagevec */
597
+ get_page(page);
598
599
+ /*
600
+ * Drop extra pins before trying to invalidate
601
+ * the huge page.
602
+ */
603
+ pagevec_remove_exceptionals(&pvec);
604
+ pagevec_release(&pvec);
605
606
607
ret = invalidate_inode_page(page);
@@ -602,6 +612,8 @@ unsigned long invalidate_mapping_pages(struct address_space *mapping,
612
*/
613
if (!ret)
614
deactivate_file_page(page);
615
+ if (PageTransHuge(page))
616
+ put_page(page);
617
count += ret;
618
619
pagevec_remove_exceptionals(&pvec);
0 commit comments