sched/headers: Prepare for new header dependencies before moving code to <linux/sched...
[linux-2.6-block.git] / fs / proc / task_mmu.c
index 8f96a49178d0d48ae220a029aa9c6f25c6bedab6..f08bd31c1081cc0536602db9d865f4bf491440c9 100644 (file)
@@ -11,6 +11,7 @@
 #include <linux/mempolicy.h>
 #include <linux/rmap.h>
 #include <linux/swap.h>
+#include <linux/sched/mm.h>
 #include <linux/swapops.h>
 #include <linux/mmu_notifier.h>
 #include <linux/page_idle.h>
@@ -167,7 +168,7 @@ static void *m_start(struct seq_file *m, loff_t *ppos)
                return ERR_PTR(-ESRCH);
 
        mm = priv->mm;
-       if (!mm || !atomic_inc_not_zero(&mm->mm_users))
+       if (!mm || !mmget_not_zero(mm))
                return NULL;
 
        down_read(&mm->mmap_sem);
@@ -1352,7 +1353,7 @@ static ssize_t pagemap_read(struct file *file, char __user *buf,
        unsigned long end_vaddr;
        int ret = 0, copied = 0;
 
-       if (!mm || !atomic_inc_not_zero(&mm->mm_users))
+       if (!mm || !mmget_not_zero(mm))
                goto out;
 
        ret = -EINVAL;