aboutsummaryrefslogtreecommitdiffstats
path: root/fs/btrfs/compression.c
diff options
context:
space:
mode:
Diffstat (limited to 'fs/btrfs/compression.c')
-rw-r--r--fs/btrfs/compression.c9
1 files changed, 3 insertions, 6 deletions
diff --git a/fs/btrfs/compression.c b/fs/btrfs/compression.c
index ad7274137309..2436163d5436 100644
--- a/fs/btrfs/compression.c
+++ b/fs/btrfs/compression.c
@@ -124,8 +124,7 @@ static int check_compressed_csum(struct inode *inode,
124 u32 csum; 124 u32 csum;
125 u32 *cb_sum = &cb->sums; 125 u32 *cb_sum = &cb->sums;
126 126
127 if (btrfs_test_opt(root, NODATASUM) || 127 if (btrfs_test_flag(inode, NODATASUM))
128 btrfs_test_flag(inode, NODATASUM))
129 return 0; 128 return 0;
130 129
131 for (i = 0; i < cb->nr_pages; i++) { 130 for (i = 0; i < cb->nr_pages; i++) {
@@ -671,8 +670,7 @@ int btrfs_submit_compressed_read(struct inode *inode, struct bio *bio,
671 */ 670 */
672 atomic_inc(&cb->pending_bios); 671 atomic_inc(&cb->pending_bios);
673 672
674 if (!btrfs_test_opt(root, NODATASUM) && 673 if (!btrfs_test_flag(inode, NODATASUM)) {
675 !btrfs_test_flag(inode, NODATASUM)) {
676 btrfs_lookup_bio_sums(root, inode, comp_bio, 674 btrfs_lookup_bio_sums(root, inode, comp_bio,
677 sums); 675 sums);
678 } 676 }
@@ -699,8 +697,7 @@ int btrfs_submit_compressed_read(struct inode *inode, struct bio *bio,
699 ret = btrfs_bio_wq_end_io(root->fs_info, comp_bio, 0); 697 ret = btrfs_bio_wq_end_io(root->fs_info, comp_bio, 0);
700 BUG_ON(ret); 698 BUG_ON(ret);
701 699
702 if (!btrfs_test_opt(root, NODATASUM) && 700 if (!btrfs_test_flag(inode, NODATASUM)) {
703 !btrfs_test_flag(inode, NODATASUM)) {
704 btrfs_lookup_bio_sums(root, inode, comp_bio, sums); 701 btrfs_lookup_bio_sums(root, inode, comp_bio, sums);
705 } 702 }
706 703