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

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Matthew Wilcox (Oracle) <willy@xxxxxxxxxxxxx> 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@xxxxxxxxxxxxx>
> Reviewed-by: Christoph Hellwig <hch@xxxxxx>
> ...
> +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@xxxxxxxxxx>





[Index of Archives]     [Linux ARM Kernel]     [Linux ARM]     [Linux Omap]     [Fedora ARM]     [IETF Annouce]     [Bugtraq]     [Linux OMAP]     [Linux MIPS]     [eCos]     [Asterisk Internet PBX]     [Linux API]

  Powered by Linux