diff options
author | Omar Sandoval <osandov@fb.com> | 2019-12-03 02:34:17 +0100 |
---|---|---|
committer | David Sterba <dsterba@suse.com> | 2020-01-20 16:40:53 +0100 |
commit | e62958fce94b30ef6aab99bb1bc49fde7fac73ea (patch) | |
tree | 509491100db697f6a2b1ce737ed477f581fd39c2 /fs/btrfs/compression.c | |
parent | btrfs: reset device back to allocation state when removing (diff) | |
download | linux-e62958fce94b30ef6aab99bb1bc49fde7fac73ea.tar.xz linux-e62958fce94b30ef6aab99bb1bc49fde7fac73ea.zip |
btrfs: get rid of trivial __btrfs_lookup_bio_sums() wrappers
Currently, we have two wrappers for __btrfs_lookup_bio_sums():
btrfs_lookup_bio_sums_dio(), which is used for direct I/O, and
btrfs_lookup_bio_sums(), which is used everywhere else. The only
difference is that the _dio variant looks up csums starting at the given
offset instead of using the page index, which isn't actually direct
I/O-specific. Let's clean up the signature and return value of
__btrfs_lookup_bio_sums(), rename it to btrfs_lookup_bio_sums(), and get
rid of the trivial helpers.
Reviewed-by: Nikolay Borisov <nborisov@suse.com>
Signed-off-by: Omar Sandoval <osandov@fb.com>
Signed-off-by: David Sterba <dsterba@suse.com>
Diffstat (limited to 'fs/btrfs/compression.c')
-rw-r--r-- | fs/btrfs/compression.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/fs/btrfs/compression.c b/fs/btrfs/compression.c index 43e1660f450f..b6373de176f8 100644 --- a/fs/btrfs/compression.c +++ b/fs/btrfs/compression.c @@ -763,7 +763,7 @@ blk_status_t btrfs_submit_compressed_read(struct inode *inode, struct bio *bio, if (!(BTRFS_I(inode)->flags & BTRFS_INODE_NODATASUM)) { ret = btrfs_lookup_bio_sums(inode, comp_bio, - sums); + false, 0, sums); BUG_ON(ret); /* -ENOMEM */ } @@ -791,7 +791,7 @@ blk_status_t btrfs_submit_compressed_read(struct inode *inode, struct bio *bio, BUG_ON(ret); /* -ENOMEM */ if (!(BTRFS_I(inode)->flags & BTRFS_INODE_NODATASUM)) { - ret = btrfs_lookup_bio_sums(inode, comp_bio, sums); + ret = btrfs_lookup_bio_sums(inode, comp_bio, false, 0, sums); BUG_ON(ret); /* -ENOMEM */ } |