X-Git-Url: https://err.no/cgi-bin/gitweb.cgi?a=blobdiff_plain;f=mm%2Frmap.c;h=57ad276900c94903a2febd53e1c0d995958a38a9;hb=2dd550b90b03d5f236a18ae491bf6e70798469a8;hp=dbc2ca2057a54ff2c4a709de4b6e9a01694241bb;hpb=b5faa4b89e4d83203b1f44f143a351b518f7cda2;p=linux-2.6 diff --git a/mm/rmap.c b/mm/rmap.c index dbc2ca2057..57ad276900 100644 --- a/mm/rmap.c +++ b/mm/rmap.c @@ -36,7 +36,6 @@ * mapping->tree_lock (widely used, in set_page_dirty, * in arch-dependent flush_dcache_mmap_lock, * within inode_lock in __sync_single_inode) - * zone->lock (within radix tree node alloc) */ #include @@ -284,7 +283,10 @@ static int page_referenced_one(struct page *page, if (!pte) goto out; - if (ptep_clear_flush_young(vma, address, pte)) + if (vma->vm_flags & VM_LOCKED) { + referenced++; + *mapcount = 1; /* break early from loop */ + } else if (ptep_clear_flush_young(vma, address, pte)) referenced++; /* Pretend the page is referenced if the task has the