Re: [PATCH] btrfs: Remove done label in writepage_delalloc

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

 



On 16/07/2020 17:17, Nikolay Borisov wrote:
> Since there is not common cleanup run after the label it makes it somewhat
> redundant.
> 
> Signed-off-by: Nikolay Borisov <nborisov@xxxxxxxx>
> ---
>  fs/btrfs/extent_io.c | 8 ++------
>  1 file changed, 2 insertions(+), 6 deletions(-)
> 
> diff --git a/fs/btrfs/extent_io.c b/fs/btrfs/extent_io.c
> index a76b7da91aa6..e6d1d46ae384 100644
> --- a/fs/btrfs/extent_io.c
> +++ b/fs/btrfs/extent_io.c
> @@ -3445,8 +3445,7 @@ static noinline_for_stack int writepage_delalloc(struct btrfs_inode *inode,
>  			 * started, so we don't want to return > 0 unless
>  			 * things are going well.
>  			 */
> -			ret = ret < 0 ? ret : -EIO;
> -			goto done;
> +			return ret < 0 ? ret : -EIO;
>  		}
>  		/*
>  		 * delalloc_end is already one less than the total length, so
> @@ -3478,10 +3477,7 @@ static noinline_for_stack int writepage_delalloc(struct btrfs_inode *inode,
>  		return 1;
>  	}
> 
> -	ret = 0;
> -
> -done:
> -	return ret;
> +	return 0;
>  }

I thought David doesn't like direct returns in loops?

/me thinks this is easier to understand though

Reviewed-by: Johannes Thumshirn <johannes.thumshirn@xxxxxxx> 




[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