Skip to content

Commit

Permalink
btrfs: remove fail label in check_compressed_csum
Browse files Browse the repository at this point in the history
Signed-off-by: Nikolay Borisov <nborisov@suse.com>
Reviewed-by: David Sterba <dsterba@suse.com>
Signed-off-by: David Sterba <dsterba@suse.com>
  • Loading branch information
Nikolay Borisov authored and David Sterba committed Jul 27, 2020
1 parent b7d2083 commit 93c4c03
Showing 1 changed file with 2 additions and 7 deletions.
9 changes: 2 additions & 7 deletions fs/btrfs/compression.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand All @@ -205,15 +204,11 @@ static int check_compressed_csum(struct btrfs_inode *inode, struct bio *bio,
btrfs_dev_stat_inc_and_print(
btrfs_io_bio(bio)->device,
BTRFS_DEV_STAT_CORRUPTION_ERRS);
ret = -EIO;
goto fail;
return -EIO;
}
cb_sum += csum_size;

}
ret = 0;
fail:
return ret;
return 0;
}

/* when we finish reading compressed pages from the disk, we
Expand Down

0 comments on commit 93c4c03

Please sign in to comment.