Re: [PATCH] btrfs: Cleanup btrfs_destroy_delayed_refs()

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

 



On Tue, Apr 16, 2019 at 01:57:39PM +0800, Qu Wenruo wrote:
> This patches cleans up btrfs_destroy_delayed_refs() by:
> - Remove the forward declaration
>   The caller comes after the implementation, no need to do forward
>   declaration.

Ok.

> - Remove the @fs_info parameter
>   @fs_info can be extracted from @trans parameter.

Ok.

> - Make it return void
>   Again, no failure pattern.

When switching a fuction to return void, please check the whole
callgraph for functions that do not properly handler errors and do
BUG_ON. You won't see errors passed from them so this gives the
impression no error handling is needed in the caller.

This has been sent in the past, so I can point you to the 2nd paragraph in
https://lore.kernel.org/linux-btrfs/20180815124425.GM24025@xxxxxxxxxxxxx/

hint: btrfs_pin_extent



[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