Re: [PATCH v14 085/138] mm/filemap: Add filemap_alloc_folio

From
David Howells <dhowells@redhat.com>
Date
2021-08-10 21:54:45
Also in
linux-fsdevel, lkml
Reply to
Matthew Wilcox (Oracle), 2021-07-15
Matthew Wilcox (Oracle) [off-list ref] wrote:
Reimplement __page_cache_alloc as a wrapper around filemap_alloc_folio
to allow filesystems to be converted at our leisure.  Increases
kernel text size by 133 bytes, mostly in cachefiles_read_backing_file().
pagecache_get_page() shrinks by 32 bytes, though.

Signed-off-by: Matthew Wilcox (Oracle) <willy@infradead.org>
Reviewed-by: Christoph Hellwig <hch@lst.de>
...
+static inline struct page *__page_cache_alloc(gfp_t gfp)
+{
+	return &filemap_alloc_folio(gfp, 0)->page;
+}
Might be worth a note that this *will* return NULL if the allocation fails,
though I guess it's deprecated?

Reviewed-by: David Howells <dhowells@redhat.com>

Thread (389 messages) 389 messages, 13 authors, last reply 2021-08-21
Keyboard shortcuts
hback out one level
jnext message in thread / next series-diff position
kprevious message in thread / previous series-diff position
ldrill in
Escclose help / fold thread tree
?toggle this help