aboutsummaryrefslogtreecommitdiff
path: root/fs/btrfs/compression.c
diff options
context:
space:
mode:
authorNikolay Borisov2020-07-02 16:46:47 +0300
committerDavid Sterba2020-07-27 12:55:42 +0200
commit93c4c033ec66d1de90d03bc11b7b338a01188954 (patch)
tree7064d6ee74107e9b53a44fa44df817bc79ff954e /fs/btrfs/compression.c
parentb7d2083a368332b40309c16bb2e7d48ecc920489 (diff)
btrfs: remove fail label in check_compressed_csum
Signed-off-by: Nikolay Borisov <nborisov@suse.com> Reviewed-by: David Sterba <dsterba@suse.com> Signed-off-by: David Sterba <dsterba@suse.com>
Diffstat (limited to 'fs/btrfs/compression.c')
-rw-r--r--fs/btrfs/compression.c9
1 files changed, 2 insertions, 7 deletions
diff --git a/fs/btrfs/compression.c b/fs/btrfs/compression.c
index 7b7aa7b2f872..1ab56a734e70 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;
@@ -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