Re: [PATCH 1/2] mm: Remove redundant test from find_get_pages_contig

2018-11-23 Thread Matthew Wilcox
On Fri, Nov 23, 2018 at 01:47:32PM +0300, Kirill A. Shutemov wrote: > On Thu, Nov 22, 2018 at 01:32:23PM -0800, Matthew Wilcox wrote: > > After we establish a reference on the page, we check the pointer continues > > to be in the correct position in i_pages. There's no need to check the > > page->

Re: [PATCH 1/2] mm: Remove redundant test from find_get_pages_contig

2018-11-23 Thread Kirill A. Shutemov
On Thu, Nov 22, 2018 at 01:32:23PM -0800, Matthew Wilcox wrote: > After we establish a reference on the page, we check the pointer continues > to be in the correct position in i_pages. There's no need to check the > page->mapping or page->index afterwards; if those can change after we've > got the

[PATCH 1/2] mm: Remove redundant test from find_get_pages_contig

2018-11-22 Thread Matthew Wilcox
After we establish a reference on the page, we check the pointer continues to be in the correct position in i_pages. There's no need to check the page->mapping or page->index afterwards; if those can change after we've got the reference, they can change after we return the page to the caller. Sig