Re: [PATCH 25/48] filemap: Add read_cache_folio and read_mapping_folio

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

 



On Thu, Dec 23, 2021 at 08:39:59AM +0100, Christoph Hellwig wrote:
> > thn makes up for the extra 100 bytes of text added to the various
> 
> s/thn/
> 
> >  	return read_cache_page(mapping, index, NULL, data);
> >  }
> >  
> > +static inline struct folio *read_mapping_folio(struct address_space *mapping,
> > +				pgoff_t index, void *data)
> > +{
> > +	return read_cache_folio(mapping, index, NULL, data);
> > +}
> 
> Is there much of a point in this wrapper?

Comparing read_mapping_page() vs read_cache_page(), 4 callers vs ~50.
It's definitely the preferred form, so I'd rather keep it.

> > +static struct page *do_read_cache_page(struct address_space *mapping,
> > +		pgoff_t index, filler_t *filler, void *data, gfp_t gfp)
> > +{
> > +	struct folio *folio = read_cache_folio(mapping, index, filler, data);
> > +	if (IS_ERR(folio))
> > +		return &folio->page;
> > +	return folio_file_page(folio, index);
> > +}
> 
> This drops the gfp on the floor.

Oops.  Will fix.



[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