From: Ying Han Date: Thu, 3 May 2012 05:43:49 +0000 (+1000) Subject: mm: rename is_mlocked_vma() to mlocked_vma_newpage() X-Git-Tag: next-20120503~2^2~194 X-Git-Url: https://git.karo-electronics.de/?a=commitdiff_plain;h=9f2850e9629e55954103cec6740ba73e4d677d95;p=karo-tx-linux.git mm: rename is_mlocked_vma() to mlocked_vma_newpage() Andrew pointed out that the is_mlocked_vma() is misnamed. A function with name like that would expect bool return and no side-effects. Since it is called on the fault path for new page, rename it in this patch. Signed-off-by: Ying Han Reviewed-by: Rik van Riel Acked-by: KOSAKI Motohiro Acked-by: KAMEZAWA Hiroyuki Reviewed-by: Minchan Kim Signed-off-by: Andrew Morton --- diff --git a/mm/internal.h b/mm/internal.h index aee4761cf9a9..0b45014d6c53 100644 --- a/mm/internal.h +++ b/mm/internal.h @@ -164,7 +164,8 @@ static inline void munlock_vma_pages_all(struct vm_area_struct *vma) * to determine if it's being mapped into a LOCKED vma. * If so, mark page as mlocked. */ -static inline int is_mlocked_vma(struct vm_area_struct *vma, struct page *page) +static inline int mlock_vma_newpage(struct vm_area_struct *vma, + struct page *page) { VM_BUG_ON(PageLRU(page)); @@ -222,7 +223,7 @@ extern unsigned long vma_address(struct page *page, struct vm_area_struct *vma); #endif #else /* !CONFIG_MMU */ -static inline int is_mlocked_vma(struct vm_area_struct *v, struct page *p) +static inline int mlock_vma_newpage(struct vm_area_struct *v, struct page *p) { return 0; } diff --git a/mm/vmscan.c b/mm/vmscan.c index 8fffc65a84de..e4e00d991b84 100644 --- a/mm/vmscan.c +++ b/mm/vmscan.c @@ -3321,7 +3321,7 @@ int page_evictable(struct page *page, struct vm_area_struct *vma) if (mapping_unevictable(page_mapping(page))) return 0; - if (PageMlocked(page) || (vma && is_mlocked_vma(vma, page))) + if (PageMlocked(page) || (vma && mlock_vma_newpage(vma, page))) return 0; return 1;