lkml.org 
[lkml]   [2016]   [Mar]   [28]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCHv4 00/25] THP-enabled tmpfs/shmem
On Mon, 28 Mar 2016, Kirill A. Shutemov wrote:
>
> I think I found it. I have refcounting screwed up in faultaround.
>
> This should fix the problem:

Yes, this fixes it for me - thanks.

Hugh

>
> diff --git a/mm/filemap.c b/mm/filemap.c
> index 94c097ec08e7..1325bb4568d1 100644
> --- a/mm/filemap.c
> +++ b/mm/filemap.c
> @@ -2292,19 +2292,18 @@ repeat:
> if (fe->pte)
> fe->pte += iter.index - last_pgoff;
> last_pgoff = iter.index;
> - alloc_set_pte(fe, NULL, page);
> + if (alloc_set_pte(fe, NULL, page))
> + goto unlock;
> unlock_page(page);
> - /* Huge page is mapped? No need to proceed. */
> - if (pmd_trans_huge(*fe->pmd))
> - break;
> - /* Failed to setup page table? */
> - VM_BUG_ON(!fe->pte);
> goto next;
> unlock:
> unlock_page(page);
> skip:
> page_cache_release(page);
> next:
> + /* Huge page is mapped? No need to proceed. */
> + if (pmd_trans_huge(*fe->pmd))
> + break;
> if (iter.index == end_pgoff)
> break;
> }
> --
> Kirill A. Shutemov

\
 
 \ /
  Last update: 2016-03-28 21:01    [W:0.179 / U:0.864 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site