The patch titled Subject: mm-put_and_wait_on_page_locked-while-page-is-migrated-fix has been added to the -mm tree. Its filename is mm-put_and_wait_on_page_locked-while-page-is-migrated-fix.patch This patch should soon appear at http://ozlabs.org/~akpm/mmots/broken-out/mm-put_and_wait_on_page_locked-while-page-is-migrated-fix.patch and later at http://ozlabs.org/~akpm/mmotm/broken-out/mm-put_and_wait_on_page_locked-while-page-is-migrated-fix.patch Before you just go and hit "reply", please: a) Consider who else should be cc'ed b) Prefer to cc a suitable mailing list as well c) Ideally: find the original patch on the mailing list and do a reply-to-all to that, adding suitable additional cc's *** Remember to use Documentation/process/submit-checklist.rst when testing your code *** The -mm tree is included into linux-next and is updated there every 3-4 working days ------------------------------------------------------ From: Matthew Wilcox <willy@xxxxxxxxxxxxx> Subject: mm-put_and_wait_on_page_locked-while-page-is-migrated-fix add put_and_wait_on_page_locked() kerneldoc Cc: Andi Kleen <ak@xxxxxxxxxxxxxxx> Cc: Andrea Arcangeli <aarcange@xxxxxxxxxx> Cc: Baoquan He <bhe@xxxxxxxxxx> Cc: Christoph Lameter <cl@xxxxxxxxx> Cc: David Herrmann <dh.herrmann@xxxxxxxxx> Cc: David Hildenbrand <david@xxxxxxxxxx> Cc: Davidlohr Bueso <dave@xxxxxxxxxxxx> Cc: Hugh Dickins <hughd@xxxxxxxxxx> Cc: Kan Liang <kan.liang@xxxxxxxxx> Cc: Linus Torvalds <torvalds@xxxxxxxxxxxxxxxxxxxx> Cc: Matthew Wilcox <willy@xxxxxxxxxxxxx> Cc: Mel Gorman <mgorman@xxxxxxxxxxxxxxxxxxx> Cc: Michal Hocko <mhocko@xxxxxxxx> Cc: Nick Piggin <npiggin@xxxxxxxxx>, Cc: Peter Zijlstra <peterz@xxxxxxxxxxxxx> Cc: Tim Chen <tim.c.chen@xxxxxxxxxxxxxxx> Cc: Vlastimil Babka <vbabka@xxxxxxx> Signed-off-by: Andrew Morton <akpm@xxxxxxxxxxxxxxxxxxxx> --- --- a/mm/filemap.c~mm-put_and_wait_on_page_locked-while-page-is-migrated-fix +++ a/mm/filemap.c @@ -1175,6 +1175,16 @@ int wait_on_page_bit_killable(struct pag } EXPORT_SYMBOL(wait_on_page_bit_killable); +/** + * put_and_wait_on_page_locked - Drop a reference and wait for it to be unlocked + * @page: The page to wait for. + * + * The caller should hold a reference on @page. They expect the page to + * become unlocked relatively soon, but do not wish to hold up migration + * (for example) by holding the reference while waiting for the page to + * come unlocked. After this function returns, the caller should not + * dereference @page. + */ void put_and_wait_on_page_locked(struct page *page) { wait_queue_head_t *q; _ Patches currently in -mm which might be from willy@xxxxxxxxxxxxx are mm-put_and_wait_on_page_locked-while-page-is-migrated-fix.patch fls-change-parameter-to-unsigned-int.patch