]> git.karo-electronics.de Git - karo-tx-linux.git/commitdiff
pagemap-introduce-pagemap_entry_t-without-pmshift-bits-v4
authorPavel Emelyanov <xemul@parallels.com>
Thu, 23 May 2013 00:37:06 +0000 (10:37 +1000)
committerStephen Rothwell <sfr@canb.auug.org.au>
Mon, 27 May 2013 06:08:58 +0000 (16:08 +1000)
Signed-off-by: Pavel Emelyanov <xemul@parallels.com>
Cc: Matt Mackall <mpm@selenic.com>
Cc: Xiao Guangrong <xiaoguangrong@linux.vnet.ibm.com>
Cc: Glauber Costa <glommer@parallels.com>
Cc: Marcelo Tosatti <mtosatti@redhat.com>
Cc: KOSAKI Motohiro <kosaki.motohiro@gmail.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
fs/proc/task_mmu.c

index 41a2af429af45c3657617141b936f72b73e0b3ac..39d6412925795e76c576168afd6c6ca2a42b506a 100644 (file)
@@ -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,