Change mincore() to count "mapped" pages rather than "cached" pages
[linux-2.6-block.git] / mm / mmap.c
index 7bb64381e77c09e2af0a3b693a93d5d48659ae7b..f901065c4c64cf63b455497fb993e7c4eacfc184 100644 (file)
--- a/mm/mmap.c
+++ b/mm/mmap.c
@@ -2973,16 +2973,6 @@ out:
        return ret;
 }
 
-static inline void verify_mm_writelocked(struct mm_struct *mm)
-{
-#ifdef CONFIG_DEBUG_VM
-       if (unlikely(down_read_trylock(&mm->mmap_sem))) {
-               WARN_ON(1);
-               up_read(&mm->mmap_sem);
-       }
-#endif
-}
-
 /*
  *  this is really a simplified "do_mmap".  it only handles
  *  anonymous maps.  eventually we may be able to do some
@@ -3009,12 +2999,6 @@ static int do_brk_flags(unsigned long addr, unsigned long len, unsigned long fla
        if (error)
                return error;
 
-       /*
-        * mm->mmap_sem is required to protect against another thread
-        * changing the mappings in case we sleep.
-        */
-       verify_mm_writelocked(mm);
-
        /*
         * Clear old maps.  this also does some error checking for us
         */