Re: [RFC 2/4] buffer: add alloc_folio_buffers() helper

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

 



On 2023-04-14 15:06, Matthew Wilcox wrote:
> On Fri, Apr 14, 2023 at 01:08:19PM +0200, Pankaj Raghav wrote:
>> Folio version of alloc_page_buffers() helper. This is required to convert
>> create_page_buffers() to create_folio_buffers() later in the series.
>>
>> It removes one call to compound_head() compared to alloc_page_buffers().
> 
> I would convert alloc_page_buffers() to folio_alloc_buffers() and
> add
> 
> static struct buffer_head *alloc_page_buffers(struct page *page,
> 		unsigned long size, bool retry)
> {
> 	return folio_alloc_buffers(page_folio(page), size, retry);
> }
> 
> in buffer_head.h
> 
> (there are only five callers, so this feels like a better tradeoff
> than creating a new function)
> 
That is a good idea and follows the usual pattern for folio conversion. I will
send a new version soon with your other comments as well.

--
Pankaj



[Index of Archives]     [Linux Ext4 Filesystem]     [Union Filesystem]     [Filesystem Testing]     [Ceph Users]     [Ecryptfs]     [NTFS 3]     [AutoFS]     [Kernel Newbies]     [Share Photos]     [Security]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux Cachefs]     [Reiser Filesystem]     [Linux RAID]     [NTFS 3]     [Samba]     [Device Mapper]     [CEPH Development]

  Powered by Linux