diff --git a/fs/proc/task_mmu.c b/fs/proc/task_mmu.c index ac605f143762..0f5c06b8bb34 100644 --- a/fs/proc/task_mmu.c +++ b/fs/proc/task_mmu.c @@ -1519,6 +1519,8 @@ static int pagemap_pmd_range(pmd_t *pmdp, unsigned long addr, unsigned long end, } #endif + if (page && !PageAnon(page)) + flags |= PM_FILE; if (page && !migration && page_mapcount(page) == 1) flags |= PM_MMAP_EXCLUSIVE;