From cd0537449c275ca7da6f6e3ea2389ae5225c6b4e Mon Sep 17 00:00:00 2001 From: Nikolay Borisov Date: Fri, 18 Sep 2020 16:34:35 +0300 Subject: [PATCH] btrfs: call submit_bio_hook directly in submit_one_bio 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 Reviewed-by: David Sterba Signed-off-by: David Sterba --- fs/btrfs/extent_io.c | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/fs/btrfs/extent_io.c b/fs/btrfs/extent_io.c index 6cee6b611d0c..1a96251ade1f 100644 --- a/fs/btrfs/extent_io.c +++ b/fs/btrfs/extent_io.c @@ -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); } -- 2.25.1