Re: [PATCHv3 1/3] fs/btrfs/disk-io: change btrfs_destroy_delayed_refs to be void function
From: David Sterba
Date: Wed Aug 15 2018 - 08:44:37 EST
On Wed, Aug 08, 2018 at 09:47:53PM +0800, zhong jiang wrote:
> btrfs_destroy_delayed_refs defines the variable "ret" for return value, but
> it is not modified after initialization. Further, I find that any of the
> callees do not handle the return value. So it is safe to drop the
> unneeded value "ret".
The callers care about the return values, not the callees. My point in
the previous patch iterations was to make sure that none of the callees,
ie. the functions that are called by btrfs_destroy_delayed_refs, do not
lack error handling.
And I found one that does, btrfs_pin_extent, near the end of the while
loop. So, there's more work and I can't apply this patch until it's
fixed, which may make this patch obsolete as the return value would be
actually needed.