Messages in this thread | | | Date | Tue, 8 Sep 2009 12:30:39 +0100 (BST) | From | Hugh Dickins <> | Subject | Re: [PATCH 1/8] mm: munlock use follow_page |
| |
On Tue, 8 Sep 2009, KAMEZAWA Hiroyuki wrote: > On Mon, 7 Sep 2009 22:29:55 +0100 (BST) > Hugh Dickins <hugh.dickins@tiscali.co.uk> wrote: > > void munlock_vma_pages_range(struct vm_area_struct *vma, > > - unsigned long start, unsigned long end) > > + unsigned long start, unsigned long end) > > { > > + unsigned long addr; > > + > > + lru_add_drain(); > > vma->vm_flags &= ~VM_LOCKED; > > - __mlock_vma_pages_range(vma, start, end, 0); > > + > > + for (addr = start; addr < end; addr += PAGE_SIZE) { > > + struct page *page = follow_page(vma, addr, FOLL_GET); > > + if (page) { > > + lock_page(page); > > + if (page->mapping) > > + munlock_vma_page(page); > > Could you add "please see __mlock_vma_pages_range() to see why" or some here ?
Why the test on page->mapping? Right, I'll add some such comment on that. Waiting a day or two to see what else comes up.
Thanks, Hugh
| |