summaryrefslogtreecommitdiff
path: root/mm/filemap.c
diff options
context:
space:
mode:
authorMatthew Wilcox (Oracle) <willy@infradead.org>2021-03-04 10:21:02 -0500
committerMatthew Wilcox (Oracle) <willy@infradead.org>2021-09-27 09:27:30 -0400
commit6baa8d602e84d97a7541ed94ccaeb6a3f9763111 (patch)
treeb2681a135869b00cf38927c68e9e7ca06bfc4e55 /mm/filemap.c
parentffdc8dabf20b1b894eda63e7ec9ca15ab0b7292c (diff)
mm/filemap: Add folio_wait_locked()
Also add folio_wait_locked_killable(). Turn wait_on_page_locked() and wait_on_page_locked_killable() into wrappers. This eliminates a call to compound_head() from each call-site, reducing text size by 193 bytes for me. Signed-off-by: Matthew Wilcox (Oracle) <willy@infradead.org> Reviewed-by: Christoph Hellwig <hch@lst.de> Acked-by: Jeff Layton <jlayton@kernel.org> Acked-by: Kirill A. Shutemov <kirill.shutemov@linux.intel.com> Acked-by: Vlastimil Babka <vbabka@suse.cz> Reviewed-by: William Kucharski <william.kucharski@oracle.com> Reviewed-by: David Howells <dhowells@redhat.com> Acked-by: Mike Rapoport <rppt@linux.ibm.com>
Diffstat (limited to 'mm/filemap.c')
-rw-r--r--mm/filemap.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/mm/filemap.c b/mm/filemap.c
index 655145d27fff..b17b58c29ed7 100644
--- a/mm/filemap.c
+++ b/mm/filemap.c
@@ -1704,9 +1704,9 @@ int __lock_page_or_retry(struct page *page, struct mm_struct *mm,
mmap_read_unlock(mm);
if (flags & FAULT_FLAG_KILLABLE)
- wait_on_page_locked_killable(page);
+ folio_wait_locked_killable(folio);
else
- wait_on_page_locked(page);
+ folio_wait_locked(folio);
return 0;
}
if (flags & FAULT_FLAG_KILLABLE) {