btrfs: replace fs_info and private_data with inode in btrfs_wq_submit_bio
All callers of btrfs_wq_submit_bio() pass struct inode as @private_data, so there is no need for it to be (void *), replace it with "struct inode *inode". While we can extract fs_info from struct inode, also remove the @fs_info parameter. Since we're here, also replace all the (void *private_data) into (struct inode *inode). Reviewed-by: Goldwyn Rodrigues <rgoldwyn@suse.com> Signed-off-by: Qu Wenruo <wqu@suse.com> Reviewed-by: David Sterba <dsterba@suse.com> Signed-off-by: David Sterba <dsterba@suse.com>
This commit is contained in:
@@ -2194,11 +2194,9 @@ int btrfs_bio_fits_in_stripe(struct page *page, size_t size, struct bio *bio,
|
||||
* At IO completion time the cums attached on the ordered extent record
|
||||
* are inserted into the btree
|
||||
*/
|
||||
static blk_status_t btrfs_submit_bio_start(void *private_data, struct bio *bio,
|
||||
u64 bio_offset)
|
||||
static blk_status_t btrfs_submit_bio_start(struct inode *inode, struct bio *bio,
|
||||
u64 bio_offset)
|
||||
{
|
||||
struct inode *inode = private_data;
|
||||
|
||||
return btrfs_csum_one_bio(BTRFS_I(inode), bio, 0, 0);
|
||||
}
|
||||
|
||||
@@ -2263,8 +2261,8 @@ blk_status_t btrfs_submit_data_bio(struct inode *inode, struct bio *bio,
|
||||
if (root->root_key.objectid == BTRFS_DATA_RELOC_TREE_OBJECTID)
|
||||
goto mapit;
|
||||
/* we're doing a write, do the async checksumming */
|
||||
ret = btrfs_wq_submit_bio(fs_info, bio, mirror_num, bio_flags,
|
||||
0, inode, btrfs_submit_bio_start);
|
||||
ret = btrfs_wq_submit_bio(inode, bio, mirror_num, bio_flags,
|
||||
0, btrfs_submit_bio_start);
|
||||
goto out;
|
||||
} else if (!skip_sum) {
|
||||
ret = btrfs_csum_one_bio(BTRFS_I(inode), bio, 0, 0);
|
||||
@@ -7747,11 +7745,9 @@ static void __endio_write_update_ordered(struct btrfs_inode *inode,
|
||||
}
|
||||
}
|
||||
|
||||
static blk_status_t btrfs_submit_bio_start_direct_io(void *private_data,
|
||||
struct bio *bio, u64 offset)
|
||||
static blk_status_t btrfs_submit_bio_start_direct_io(struct inode *inode,
|
||||
struct bio *bio, u64 offset)
|
||||
{
|
||||
struct inode *inode = private_data;
|
||||
|
||||
return btrfs_csum_one_bio(BTRFS_I(inode), bio, offset, 1);
|
||||
}
|
||||
|
||||
@@ -7802,8 +7798,8 @@ static inline blk_status_t btrfs_submit_dio_bio(struct bio *bio,
|
||||
goto map;
|
||||
|
||||
if (write && async_submit) {
|
||||
ret = btrfs_wq_submit_bio(fs_info, bio, 0, 0,
|
||||
file_offset, inode,
|
||||
ret = btrfs_wq_submit_bio(inode, bio, 0, 0,
|
||||
file_offset,
|
||||
btrfs_submit_bio_start_direct_io);
|
||||
goto err;
|
||||
} else if (write) {
|
||||
|
||||
Reference in New Issue
Block a user