Re: [PATCH 1/5] btrfs: extent_io: Add comment about the return value of alloc_extent_buffer()

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

 



On Wed, Feb 27, 2019 at 09:41:17PM +0800, Qu Wenruo wrote:
> 
> 
> On 2019/2/27 下午9:36, David Sterba wrote:
> > On Fri, Feb 22, 2019 at 06:16:40PM +0800, Qu Wenruo wrote:
> >> To inform later developers how to check the return value of it.
> >>
> >> Signed-off-by: Qu Wenruo <wqu@xxxxxxxx>
> >> ---
> >>  fs/btrfs/extent_io.c | 7 +++++++
> >>  1 file changed, 7 insertions(+)
> >>
> >> diff --git a/fs/btrfs/extent_io.c b/fs/btrfs/extent_io.c
> >> index 52abe4082680..b28a75546700 100644
> >> --- a/fs/btrfs/extent_io.c
> >> +++ b/fs/btrfs/extent_io.c
> >> @@ -4890,6 +4890,13 @@ struct extent_buffer *alloc_test_extent_buffer(struct btrfs_fs_info *fs_info,
> >>  }
> >>  #endif
> >>  
> >> +/*
> >> + * Allocate an extent buffer structure, with all its pages attached and locked.
> >> + *
> >> + * Return valid pointer if nothing goes wrong.
> >> + * Return PTR_ERR() if failed.
> >> + * Will never return NULL.
> > 
> > I'd rather drop this as it depends on another function and the
> > GFP_NOFAIL flag that will be removed eventually. The PTR_ERR covers
> > ENOMEM and allocation failures.
> > 
> 
> I'm completely OK with the removal.
> 
> Do need to resend this patch?

Wait, I'm going through the rest.



[Index of Archives]     [Linux Filesystem Development]     [Linux NFS]     [Linux NILFS]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux