summaryrefslogtreecommitdiffstats
path: root/mm
diff options
context:
space:
mode:
Diffstat (limited to 'mm')
-rw-r--r--mm/vmscan.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/mm/vmscan.c b/mm/vmscan.c
index 2804d23e2da7..9babfbc1ddc8 100644
--- a/mm/vmscan.c
+++ b/mm/vmscan.c
@@ -2332,11 +2332,16 @@ int zone_reclaim(struct zone *zone, gfp_t gfp_mask, unsigned int order)
* lists vs unevictable list.
*
* Reasons page might not be evictable:
+ * (1) page's mapping marked unevictable
+ *
* TODO - later patches
*/
int page_evictable(struct page *page, struct vm_area_struct *vma)
{
+ if (mapping_unevictable(page_mapping(page)))
+ return 0;
+
/* TODO: test page [!]evictable conditions */
return 1;