From: Pavel Emelyanov Date: Wed, 19 Jun 2013 00:05:47 +0000 (+1000) Subject: pagemap-introduce-pagemap_entry_t-without-pmshift-bits-v4 X-Git-Tag: next-20130619~2^2~573 X-Git-Url: https://git.karo-electronics.de/?a=commitdiff_plain;h=4b9371ec5ab265fba0d1c037cfd274ac57af75df;p=karo-tx-linux.git pagemap-introduce-pagemap_entry_t-without-pmshift-bits-v4 Signed-off-by: Pavel Emelyanov Cc: Matt Mackall Cc: Xiao Guangrong Cc: Glauber Costa Cc: Marcelo Tosatti Cc: KOSAKI Motohiro Signed-off-by: Andrew Morton --- diff --git a/fs/proc/task_mmu.c b/fs/proc/task_mmu.c index 41a2af429af4..39d641292579 100644 --- a/fs/proc/task_mmu.c +++ b/fs/proc/task_mmu.c @@ -824,7 +824,7 @@ struct pagemapread { #define __PM_PSHIFT(x) (((u64) (x) << PM_PSHIFT_OFFSET) & PM_PSHIFT_MASK) #define PM_PFRAME_MASK ((1LL << PM_PSHIFT_OFFSET) - 1) #define PM_PFRAME(x) ((x) & PM_PFRAME_MASK) -/* in pagemap2 pshift bits are occupied with more status bits */ +/* in "new" pagemap pshift bits are occupied with more status bits */ #define PM_STATUS2(v2, x) (__PM_PSHIFT(v2 ? x : PAGE_SHIFT)) #define PM_PRESENT PM_STATUS(4LL) @@ -1028,8 +1028,8 @@ static int pagemap_hugetlb_range(pte_t *pte, unsigned long hmask, * determine which areas of memory are actually mapped and llseek to * skip over unmapped regions. */ -static ssize_t do_pagemap_read(struct file *file, char __user *buf, - size_t count, loff_t *ppos, bool v2) +static ssize_t pagemap_read(struct file *file, char __user *buf, + size_t count, loff_t *ppos) { struct task_struct *task = get_proc_task(file_inode(file)); struct mm_struct *mm; @@ -1054,7 +1054,7 @@ static ssize_t do_pagemap_read(struct file *file, char __user *buf, if (!count) goto out_task; - pm.v2 = v2; + pm.v2 = false; pm.len = PM_ENTRY_BYTES * (PAGEMAP_WALK_SIZE >> PAGE_SHIFT); pm.buffer = kmalloc(pm.len, GFP_TEMPORARY); ret = -ENOMEM; @@ -1127,12 +1127,6 @@ out: return ret; } -static ssize_t pagemap_read(struct file *file, char __user *buf, - size_t count, loff_t *ppos) -{ - return do_pagemap_read(file, buf, count, ppos, false); -} - const struct file_operations proc_pagemap_operations = { .llseek = mem_lseek, /* borrow this */ .read = pagemap_read,