On Fri, Mar 29, 2019 at 08:04:32PM -0700, Matthew Wilcox wrote: > Excellent! I'm not comfortable with the rule that you have to be holding > the i_pages lock in order to call find_get_page() on a swap address_space. > How does this look to the various smart people who know far more about the > MM than I do? > > The idea is to ensure that if this race does happen, the page will be > handled the same way as a pagecache page. If __delete_from_swap_cache() > can be called while the page is still part of a VMA, then this patch > will break page_to_pgoff(). But I don't think that can happen ... ? Oh, blah, that can totally happen. reuse_swap_page() calls delete_from_swap_cache(). Need a new plan.