Re: [PATCH 02/12] buffer: grow_dev_page() should use __GFP_NOFAIL for all cases

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

 



On Tue 03-10-17 14:10:49, Jan Kara wrote:
> On Wed 27-09-17 14:13:49, Jens Axboe wrote:
> > We currently it it for find_or_create_page(), which means that it
> > cannot fail. Ensure we also pass in 'retry == true' to
> > alloc_page_buffers(), which also ensure that it cannot fail.
> > 
> > After this, there are no failure cases in grow_dev_page() that
> > occur because of a failed memory allocation.
> > 
> > Signed-off-by: Jens Axboe <axboe@xxxxxxxxx>
> 
> Makes sense. You can add:
> 
> Reviewed-by: Jan Kara <jack@xxxxxxx>

I forgot one question though:

> >  	page = find_or_create_page(inode->i_mapping, index, gfp_mask);
> > -	if (!page)
> > -		return ret;

Are we sure find_or_create_page() cannot fail for other reasons than
ENOMEM? Currently it seems to be the case AFAICT but it isn't obvious to me
that is guaranteed in future as well...

								Honza

-- 
Jan Kara <jack@xxxxxxxx>
SUSE Labs, CR



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