]> git.karo-electronics.de Git - mv-sheeva.git/blobdiff - mm/rmap.c
[S390] reference bit testing for unmapped pages
[mv-sheeva.git] / mm / rmap.c
index 23295f65ae43386574f9058e30e28cdca9a8a708..9701574bb67a2501ea15ec0c82601c0cb6e9a987 100644 (file)
--- a/mm/rmap.c
+++ b/mm/rmap.c
@@ -21,7 +21,6 @@
  * Lock ordering in mm:
  *
  * inode->i_mutex      (while writing or truncating, not reading or faulting)
- *   inode->i_alloc_sem (vmtruncate_range)
  *   mm->mmap_sem
  *     page->flags PG_locked (lock_page)
  *       mapping->i_mmap_mutex
@@ -870,11 +869,11 @@ int page_referenced(struct page *page,
                                                                vm_flags);
                if (we_locked)
                        unlock_page(page);
+
+               if (page_test_and_clear_young(page_to_pfn(page)))
+                       referenced++;
        }
 out:
-       if (page_test_and_clear_young(page_to_pfn(page)))
-               referenced++;
-
        return referenced;
 }