Re: [PATCH 01/26] fs: Add aops->release_folio

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

 



On Mon, May 02, 2022 at 11:19:19AM -0400, Jeff Layton wrote:
> On Mon, 2022-05-02 at 06:55 +0100, Matthew Wilcox (Oracle) wrote:
> > diff --git a/mm/filemap.c b/mm/filemap.c
> > index 81a0ed08a82c..40df5704ec39 100644
> > --- a/mm/filemap.c
> > +++ b/mm/filemap.c
> > @@ -3956,6 +3956,8 @@ bool filemap_release_folio(struct folio *folio, gfp_t gfp)
> >  	if (folio_test_writeback(folio))
> >  		return false;
> >  
> > +	if (mapping && mapping->a_ops->release_folio)
> > +		return mapping->a_ops->release_folio(folio, gfp);
> 
> Might it be worthwhile to add something like this to the above condition
> for now?
> 
>       BUG_ON(mapping->a_ops->releasepage);
> 
> It might help catch bad conversions...

Patch 26 gets rid of ->releasepage ... I don't intend for it to stick
around for a kernel cycle and let people introduce new users ;-)

> >  	if (mapping && mapping->a_ops->releasepage)
> >  		return mapping->a_ops->releasepage(&folio->page, gfp);
> >  	return try_to_free_buffers(&folio->page);
> 
> 
> Looks pretty like a straighforward change overall.
> 
> Reviewed-by: Jeff Layton <jlayton@xxxxxxxxxx>

Thanks!



[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