btrfs: get rid of at_offset parameter to btrfs_lookup_bio_sums()

We can encode this in the offset parameter: -1 means use the page
offsets, anything else is a valid offset.

Signed-off-by: Omar Sandoval <osandov@fb.com>
Signed-off-by: David Sterba <dsterba@suse.com>
This commit is contained in:
Omar Sandoval
2019-12-10 10:37:35 -08:00
committed by David Sterba
parent e62958fce9
commit db72e47f79
4 changed files with 11 additions and 12 deletions

View File

@@ -2127,7 +2127,7 @@ static blk_status_t btrfs_submit_bio_hook(struct inode *inode, struct bio *bio,
bio_flags);
goto out;
} else if (!skip_sum) {
ret = btrfs_lookup_bio_sums(inode, bio, false, 0, NULL);
ret = btrfs_lookup_bio_sums(inode, bio, (u64)-1, NULL);
if (ret)
goto out;
}
@@ -8387,8 +8387,8 @@ static inline blk_status_t btrfs_lookup_and_bind_dio_csum(struct inode *inode,
* contention.
*/
if (dip->logical_offset == file_offset) {
ret = btrfs_lookup_bio_sums(inode, dip->orig_bio, true,
file_offset, NULL);
ret = btrfs_lookup_bio_sums(inode, dip->orig_bio, file_offset,
NULL);
if (ret)
return ret;
}