[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: hugepage patches
Andrew Morton <akpm@digeo.com> wrote:
>
> > - inode->i_sem is not taken to protect inode->i_size.
>
> OK, I'll fix that up.
>
> > - After successfully allocating a page, a test is not made to see if
> > another process with the same mapping has allocated the page first.
>
> In this case, add_to_page_cache() in hugetlb_prefault() will return -EEXIST,
> and the page which lost the race will be freed again.
>
> Uh, but we don't establish a pte against the page which got there first.
> I'll fix that up too. Thanks.
No, everything is OK isn't it? The entire operation (i_size update and
allocate/add_to_page_cache()) is serialised under i_sem.
--
To unsubscribe, send a message with 'unsubscribe linux-mm' in
the body to majordomo@kvack.org. For more info on Linux MM,
see: http://www.linux-mm.org/