net: qed: cleanup global structs declarations
[linux-2.6-microblaze.git] / mm / swapfile.c
index a3d191e..987276c 100644 (file)
@@ -40,7 +40,6 @@
 #include <linux/swap_slots.h>
 #include <linux/sort.h>
 
-#include <asm/pgtable.h>
 #include <asm/tlbflush.h>
 #include <linux/swapops.h>
 #include <linux/swap_cgroup.h>
@@ -2101,7 +2100,7 @@ static int unuse_mm(struct mm_struct *mm, unsigned int type,
        struct vm_area_struct *vma;
        int ret = 0;
 
-       down_read(&mm->mmap_sem);
+       mmap_read_lock(mm);
        for (vma = mm->mmap; vma; vma = vma->vm_next) {
                if (vma->anon_vma) {
                        ret = unuse_vma(vma, type, frontswap,
@@ -2111,7 +2110,7 @@ static int unuse_mm(struct mm_struct *mm, unsigned int type,
                }
                cond_resched();
        }
-       up_read(&mm->mmap_sem);
+       mmap_read_unlock(mm);
        return ret;
 }