Skip to content

Commit

Permalink
btrfs: call submit_bio_hook directly in submit_one_bio
Browse files Browse the repository at this point in the history
BTRFS has 2 inode types (for the purposes of the code in submit_one_bio)
- ordinary data inodes (including the freespace inode) and the btree
inode. Both of these implement submit_bio_hook so btrfsic_submit_bio can
never be called from submit_one_bio so just remove it.

Signed-off-by: Nikolay Borisov <nborisov@suse.com>
Reviewed-by: David Sterba <dsterba@suse.com>
Signed-off-by: David Sterba <dsterba@suse.com>
  • Loading branch information
Nikolay Borisov authored and David Sterba committed Oct 7, 2020
1 parent 1f03d9c commit cd05374
Showing 1 changed file with 2 additions and 5 deletions.
7 changes: 2 additions & 5 deletions fs/btrfs/extent_io.c
Original file line number Diff line number Diff line change
Expand Up @@ -168,11 +168,8 @@ int __must_check submit_one_bio(struct bio *bio, int mirror_num,

bio->bi_private = NULL;

if (tree->ops)
ret = tree->ops->submit_bio_hook(tree->private_data, bio,
mirror_num, bio_flags);
else
btrfsic_submit_bio(bio);
ret = tree->ops->submit_bio_hook(tree->private_data, bio, mirror_num,
bio_flags);

return blk_status_to_errno(ret);
}
Expand Down

0 comments on commit cd05374

Please sign in to comment.