aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--mm/gup.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/mm/gup.c b/mm/gup.c
index e83db38deb17..2b6cd3573457 100644
--- a/mm/gup.c
+++ b/mm/gup.c
@@ -1238,6 +1238,8 @@ static int gup_pte_range(pmd_t pmd, unsigned long addr, unsigned long end,
1238 } 1238 }
1239 1239
1240 VM_BUG_ON_PAGE(compound_head(page) != head, page); 1240 VM_BUG_ON_PAGE(compound_head(page) != head, page);
1241
1242 SetPageReferenced(page);
1241 pages[*nr] = page; 1243 pages[*nr] = page;
1242 (*nr)++; 1244 (*nr)++;
1243 1245
@@ -1299,6 +1301,7 @@ static int gup_huge_pmd(pmd_t orig, pmd_t *pmdp, unsigned long addr,
1299 return 0; 1301 return 0;
1300 } 1302 }
1301 1303
1304 SetPageReferenced(head);
1302 return 1; 1305 return 1;
1303} 1306}
1304 1307
@@ -1334,6 +1337,7 @@ static int gup_huge_pud(pud_t orig, pud_t *pudp, unsigned long addr,
1334 return 0; 1337 return 0;
1335 } 1338 }
1336 1339
1340 SetPageReferenced(head);
1337 return 1; 1341 return 1;
1338} 1342}
1339 1343
@@ -1370,6 +1374,7 @@ static int gup_huge_pgd(pgd_t orig, pgd_t *pgdp, unsigned long addr,
1370 return 0; 1374 return 0;
1371 } 1375 }
1372 1376
1377 SetPageReferenced(head);
1373 return 1; 1378 return 1;
1374} 1379}
1375 1380