File tree Expand file tree Collapse file tree 1 file changed +6
-1
lines changed Expand file tree Collapse file tree 1 file changed +6
-1
lines changed Original file line number Diff line number Diff line change @@ -1758,6 +1758,10 @@ static void collapse_file(struct mm_struct *mm,
1758
1758
filemap_flush (mapping );
1759
1759
result = SCAN_FAIL ;
1760
1760
goto xa_unlocked ;
1761
+ } else if (PageWriteback (page )) {
1762
+ xas_unlock_irq (& xas );
1763
+ result = SCAN_FAIL ;
1764
+ goto xa_unlocked ;
1761
1765
} else if (trylock_page (page )) {
1762
1766
get_page (page );
1763
1767
xas_unlock_irq (& xas );
@@ -1793,7 +1797,8 @@ static void collapse_file(struct mm_struct *mm,
1793
1797
goto out_unlock ;
1794
1798
}
1795
1799
1796
- if (!is_shmem && PageDirty (page )) {
1800
+ if (!is_shmem && (PageDirty (page ) ||
1801
+ PageWriteback (page ))) {
1797
1802
/*
1798
1803
* khugepaged only works on read-only fd, so this
1799
1804
* page is dirty because it hasn't been flushed
You can’t perform that action at this time.
0 commit comments