summaryrefslogtreecommitdiffstats
path: root/fs/btrfs/inode.c
diff options
context:
space:
mode:
authorChristoph Hellwig <hch@lst.de>2023-01-21 07:50:02 +0100
committerDavid Sterba <dsterba@suse.com>2023-02-15 19:38:50 +0100
commit4ae2edf12d49fdbaea2dfda0bb2ec06501bd3493 (patch)
tree162288423e16b1743b2c211fe116fec1a7b477a9 /fs/btrfs/inode.c
parentbtrfs: remove the direct I/O read checksum lookup optimization (diff)
downloadlinux-4ae2edf12d49fdbaea2dfda0bb2ec06501bd3493.tar.xz
linux-4ae2edf12d49fdbaea2dfda0bb2ec06501bd3493.zip
btrfs: simplify parameters of btrfs_lookup_bio_sums
The csums argument is always NULL now, so remove it and always allocate the csums array in the btrfs_bio. Also pass the btrfs_bio instead of inode + bio to document that this function requires a btrfs_bio and not just any bio. Reviewed-by: Johannes Thumshirn <johannes.thumshirn@wdc.com> Reviewed-by: Anand Jain <anand.jain@oracle.com> Signed-off-by: Christoph Hellwig <hch@lst.de> Reviewed-by: David Sterba <dsterba@suse.com> Signed-off-by: David Sterba <dsterba@suse.com>
Diffstat (limited to '')
-rw-r--r--fs/btrfs/inode.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/fs/btrfs/inode.c b/fs/btrfs/inode.c
index 863a5527853c..7c8f5349ed7a 100644
--- a/fs/btrfs/inode.c
+++ b/fs/btrfs/inode.c
@@ -2780,7 +2780,7 @@ void btrfs_submit_data_read_bio(struct btrfs_inode *inode, struct bio *bio,
* Lookup bio sums does extra checks around whether we need to csum or
* not, which is why we ignore skip_sum here.
*/
- ret = btrfs_lookup_bio_sums(&inode->vfs_inode, bio, NULL);
+ ret = btrfs_lookup_bio_sums(btrfs_bio(bio));
if (ret) {
btrfs_bio_end_io(btrfs_bio(bio), ret);
return;
@@ -8012,7 +8012,7 @@ static void btrfs_submit_dio_bio(struct bio *bio, struct btrfs_inode *inode,
return;
}
} else {
- ret = btrfs_lookup_bio_sums(&inode->vfs_inode, bio, NULL);
+ ret = btrfs_lookup_bio_sums(btrfs_bio(bio));
if (ret) {
btrfs_bio_end_io(btrfs_bio(bio), ret);
return;
@@ -10279,7 +10279,7 @@ static blk_status_t submit_encoded_read_bio(struct btrfs_inode *inode,
blk_status_t ret;
if (!priv->skip_csum) {
- ret = btrfs_lookup_bio_sums(&inode->vfs_inode, bio, NULL);
+ ret = btrfs_lookup_bio_sums(btrfs_bio(bio));
if (ret)
return ret;
}