Re: [PATCH 07/10] btrfs: Remove fail label in check_compressed_csum

David Sterba
2020-07-02T14:10:35Z

On Thu, Jul 02, 2020 at 04:46:47PM +0300, Nikolay Borisov wrote:
> Signed-off-by: Nikolay Borisov <nborisov@suse.com>
> ---
> fs/btrfs/compression.c | 8 ++------
> 1 file changed, 2 insertions(+), 6 deletions(-)
>
> diff --git a/fs/btrfs/compression.c b/fs/btrfs/compression.c
> index 2f30bf4127f8..48ceab7be0fe 100644
> --- a/fs/btrfs/compression.c
> +++ b/fs/btrfs/compression.c
> @@ -178,7 +178,6 @@ static int check_compressed_csum(struct btrfs_inode *inode, struct bio *bio,
> struct btrfs_fs_info *fs_info = inode->root->fs_info;
> SHASH_DESC_ON_STACK(shash, fs_info->csum_shash);
> const u16 csum_size = btrfs_super_csum_size(fs_info->super_copy);
> - int ret;
> struct page *page;
> unsigned long i;
> char *kaddr;
> @@ -204,15 +203,12 @@ static int check_compressed_csum(struct btrfs_inode *inode, struct bio *bio,
> if (btrfs_io_bio(bio)->dev)
> btrfs_dev_stat_inc_and_print(btrfs_io_bio(bio)->dev,
> BTRFS_DEV_STAT_CORRUPTION_ERRS);
> - ret = -EIO;
> - goto fail;
> + return -EIO;

Ok, that one looks obvious.