aboutsummaryrefslogtreecommitdiffstats
path: root/mm/memcontrol.c
diff options
context:
space:
mode:
authorKirill A. Shutemov <kirill.shutemov@linux.intel.com>2015-02-10 17:10:04 -0500
committerLinus Torvalds <torvalds@linux-foundation.org>2015-02-10 17:30:31 -0500
commit0661a33611fca12570cba48d9344ce68834ee86c (patch)
tree0cd7730b2060912b004ad28917115f7586326167 /mm/memcontrol.c
parentac51b934f3912582d3c897c6c4d09b32ea57b2c7 (diff)
mm: remove rest usage of VM_NONLINEAR and pte_file()
One bit in ->vm_flags is unused now! Signed-off-by: Kirill A. Shutemov <kirill.shutemov@linux.intel.com> Cc: Dan Carpenter <dan.carpenter@oracle.com> Cc: Michal Hocko <mhocko@suse.cz> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'mm/memcontrol.c')
-rw-r--r--mm/memcontrol.c7
1 files changed, 2 insertions, 5 deletions
diff --git a/mm/memcontrol.c b/mm/memcontrol.c
index 2f6893c2f01b..8b58701b9647 100644
--- a/mm/memcontrol.c
+++ b/mm/memcontrol.c
@@ -4926,10 +4926,7 @@ static struct page *mc_handle_file_pte(struct vm_area_struct *vma,
4926 return NULL; 4926 return NULL;
4927 4927
4928 mapping = vma->vm_file->f_mapping; 4928 mapping = vma->vm_file->f_mapping;
4929 if (pte_none(ptent)) 4929 pgoff = linear_page_index(vma, addr);
4930 pgoff = linear_page_index(vma, addr);
4931 else /* pte_file(ptent) is true */
4932 pgoff = pte_to_pgoff(ptent);
4933 4930
4934 /* page is moved even if it's not RSS of this task(page-faulted). */ 4931 /* page is moved even if it's not RSS of this task(page-faulted). */
4935#ifdef CONFIG_SWAP 4932#ifdef CONFIG_SWAP
@@ -4961,7 +4958,7 @@ static enum mc_target_type get_mctgt_type(struct vm_area_struct *vma,
4961 page = mc_handle_present_pte(vma, addr, ptent); 4958 page = mc_handle_present_pte(vma, addr, ptent);
4962 else if (is_swap_pte(ptent)) 4959 else if (is_swap_pte(ptent))
4963 page = mc_handle_swap_pte(vma, addr, ptent, &ent); 4960 page = mc_handle_swap_pte(vma, addr, ptent, &ent);
4964 else if (pte_none(ptent) || pte_file(ptent)) 4961 else if (pte_none(ptent))
4965 page = mc_handle_file_pte(vma, addr, ptent, &ent); 4962 page = mc_handle_file_pte(vma, addr, ptent, &ent);
4966 4963
4967 if (!page && !ent.val) 4964 if (!page && !ent.val)