diff options
author | Nikolay Borisov <nborisov@suse.com> | 2017-02-20 13:50:54 +0200 |
---|---|---|
committer | David Sterba <dsterba@suse.com> | 2017-02-28 11:30:09 +0100 |
commit | f898ac6ae339782bc304b2b15c9e187e438da9f7 (patch) | |
tree | c5f24586f325f8cc832cddd5675f44643c6924df /fs/btrfs/compression.c | |
parent | 0970a22e58d4c49f2c3e84519613a9db8f00f579 (diff) | |
download | linux-f898ac6ae339782bc304b2b15c9e187e438da9f7.tar.gz linux-f898ac6ae339782bc304b2b15c9e187e438da9f7.tar.bz2 linux-f898ac6ae339782bc304b2b15c9e187e438da9f7.zip |
btrfs: make check_compressed_csum take btrfs_inode
Signed-off-by: Nikolay Borisov <nborisov@suse.com>
Signed-off-by: David Sterba <dsterba@suse.com>
Diffstat (limited to 'fs/btrfs/compression.c')
-rw-r--r-- | fs/btrfs/compression.c | 9 |
1 files changed, 4 insertions, 5 deletions
diff --git a/fs/btrfs/compression.c b/fs/btrfs/compression.c index 9ce85d5e5cae..f32e86b61240 100644 --- a/fs/btrfs/compression.c +++ b/fs/btrfs/compression.c @@ -100,7 +100,7 @@ static struct bio *compressed_bio_alloc(struct block_device *bdev, return btrfs_bio_alloc(bdev, first_byte >> 9, BIO_MAX_PAGES, gfp_flags); } -static int check_compressed_csum(struct inode *inode, +static int check_compressed_csum(struct btrfs_inode *inode, struct compressed_bio *cb, u64 disk_start) { @@ -111,7 +111,7 @@ static int check_compressed_csum(struct inode *inode, u32 csum; u32 *cb_sum = &cb->sums; - if (BTRFS_I(inode)->flags & BTRFS_INODE_NODATASUM) + if (inode->flags & BTRFS_INODE_NODATASUM) return 0; for (i = 0; i < cb->nr_pages; i++) { @@ -124,8 +124,7 @@ static int check_compressed_csum(struct inode *inode, kunmap_atomic(kaddr); if (csum != *cb_sum) { - btrfs_print_data_csum_error(BTRFS_I(inode), - disk_start, csum, + btrfs_print_data_csum_error(inode, disk_start, csum, *cb_sum, cb->mirror_num); ret = -EIO; goto fail; @@ -166,7 +165,7 @@ static void end_compressed_bio_read(struct bio *bio) goto out; inode = cb->inode; - ret = check_compressed_csum(inode, cb, + ret = check_compressed_csum(BTRFS_I(inode), cb, (u64)bio->bi_iter.bi_sector << 9); if (ret) goto csum_failed; |