Messages in this thread |  | | | Date | Fri, 13 Jun 2008 09:25:20 +0900 | | From | KAMEZAWA Hiroyuki <> | | Subject | Re: [BUG] 2.6.26-rc5-mm3 kernel BUG at mm/filemap.c:575! |
On Thu, 12 Jun 2008 21:38:59 +1000
Nick Piggin <nickpiggin@yahoo.com.au> wrote:
> +int putback_lru_page(struct page *page)
> +{
> + int lru;
> + int ret = 1;
> + int was_unevictable;
> +
> + VM_BUG_ON(!PageLocked(page));
> + VM_BUG_ON(PageLRU(page));
> +
> + lru = !!TestClearPageActive(page);
> + was_unevictable = TestClearPageUnevictable(page); /* for
> page_evictable() */
> +
> + if (unlikely(!page->mapping)) {
> + /*
> + * page truncated. drop lock as put_page() will
> + * free the page.
> + */
> + VM_BUG_ON(page_count(page) != 1);
> + unlock_page(page);
> ^^^^^^^^^^^^^^^^^^
>
>
> This is a rather wild thing to be doing. It's a really bad idea
> to drop a lock that's taken several function calls distant and
> across different files...
>
I agree and strongly hope this unlock should be removed.
The caller can do unlock by itself, I think.
Thanks,
-Kame
|  |