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

Nikolay Borisov
2020-07-02T13:47:05Z

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;
}
cb_sum += csum_size;

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

/* when we finish reading compressed pages from the disk, we
--
2.17.1