Commit ad65ecf3 authored by David Sterba's avatar David Sterba

btrfs: simplify btree_submit_bio_start and btrfs_submit_bio_start parameters

After previous patches the unused parameters can be removed from
btree_submit_bio_start and btrfs_submit_bio_start as they don't need to
conform to the extent_submit_bio_start_t typedef.
Reviewed-by: default avatarAnand Jain <anand.jain@oracle.com>
Signed-off-by: default avatarDavid Sterba <dsterba@suse.com>
parent ab2072b2
...@@ -415,8 +415,7 @@ void btrfs_submit_data_write_bio(struct inode *inode, struct bio *bio, int mirro ...@@ -415,8 +415,7 @@ void btrfs_submit_data_write_bio(struct inode *inode, struct bio *bio, int mirro
void btrfs_submit_data_read_bio(struct inode *inode, struct bio *bio, void btrfs_submit_data_read_bio(struct inode *inode, struct bio *bio,
int mirror_num, enum btrfs_compression_type compress_type); int mirror_num, enum btrfs_compression_type compress_type);
void btrfs_submit_dio_repair_bio(struct inode *inode, struct bio *bio, int mirror_num); void btrfs_submit_dio_repair_bio(struct inode *inode, struct bio *bio, int mirror_num);
blk_status_t btrfs_submit_bio_start(struct inode *inode, struct bio *bio, blk_status_t btrfs_submit_bio_start(struct inode *inode, struct bio *bio);
u64 dio_file_offset);
blk_status_t btrfs_submit_bio_start_direct_io(struct inode *inode, blk_status_t btrfs_submit_bio_start_direct_io(struct inode *inode,
struct bio *bio, struct bio *bio,
u64 dio_file_offset); u64 dio_file_offset);
......
...@@ -639,18 +639,14 @@ static void run_one_async_start(struct btrfs_work *work) ...@@ -639,18 +639,14 @@ static void run_one_async_start(struct btrfs_work *work)
async = container_of(work, struct async_submit_bio, work); async = container_of(work, struct async_submit_bio, work);
switch (async->submit_cmd) { switch (async->submit_cmd) {
case WQ_SUBMIT_METADATA: case WQ_SUBMIT_METADATA:
ret = btree_submit_bio_start(async->inode, async->bio, ret = btree_submit_bio_start(async->bio);
async->dio_file_offset);
break; break;
case WQ_SUBMIT_DATA: case WQ_SUBMIT_DATA:
ret = btrfs_submit_bio_start(async->inode, async->bio, ret = btrfs_submit_bio_start(async->inode, async->bio);
async->dio_file_offset);
break; break;
case WQ_SUBMIT_DATA_DIO: case WQ_SUBMIT_DATA_DIO:
ret = btrfs_submit_bio_start_direct_io(async->inode, async->bio, ret = btrfs_submit_bio_start_direct_io(async->inode, async->bio,
async->dio_file_offset); async->dio_file_offset);
break; break;
} }
if (ret) if (ret)
...@@ -749,8 +745,7 @@ static blk_status_t btree_csum_one_bio(struct bio *bio) ...@@ -749,8 +745,7 @@ static blk_status_t btree_csum_one_bio(struct bio *bio)
return errno_to_blk_status(ret); return errno_to_blk_status(ret);
} }
blk_status_t btree_submit_bio_start(struct inode *inode, struct bio *bio, blk_status_t btree_submit_bio_start(struct bio *bio)
u64 dio_file_offset)
{ {
/* /*
* when we're called for a write, we're already in the async * when we're called for a write, we're already in the async
......
...@@ -122,8 +122,7 @@ enum btrfs_wq_submit_cmd { ...@@ -122,8 +122,7 @@ enum btrfs_wq_submit_cmd {
bool btrfs_wq_submit_bio(struct inode *inode, struct bio *bio, int mirror_num, bool btrfs_wq_submit_bio(struct inode *inode, struct bio *bio, int mirror_num,
u64 dio_file_offset, enum btrfs_wq_submit_cmd cmd); u64 dio_file_offset, enum btrfs_wq_submit_cmd cmd);
blk_status_t btree_submit_bio_start(struct inode *inode, struct bio *bio, blk_status_t btree_submit_bio_start(struct bio *bio);
u64 dio_file_offset);
int btrfs_alloc_log_tree_node(struct btrfs_trans_handle *trans, int btrfs_alloc_log_tree_node(struct btrfs_trans_handle *trans,
struct btrfs_root *root); struct btrfs_root *root);
int btrfs_init_log_root_tree(struct btrfs_trans_handle *trans, int btrfs_init_log_root_tree(struct btrfs_trans_handle *trans,
......
...@@ -2550,8 +2550,7 @@ void btrfs_clear_delalloc_extent(struct inode *vfs_inode, ...@@ -2550,8 +2550,7 @@ void btrfs_clear_delalloc_extent(struct inode *vfs_inode,
* At IO completion time the cums attached on the ordered extent record * At IO completion time the cums attached on the ordered extent record
* are inserted into the btree * are inserted into the btree
*/ */
blk_status_t btrfs_submit_bio_start(struct inode *inode, struct bio *bio, blk_status_t btrfs_submit_bio_start(struct inode *inode, struct bio *bio)
u64 dio_file_offset)
{ {
return btrfs_csum_one_bio(BTRFS_I(inode), bio, (u64)-1, false); return btrfs_csum_one_bio(BTRFS_I(inode), bio, (u64)-1, false);
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment