diff options
author | Nikolay Borisov <nborisov@suse.com> | 2020-09-18 16:34:38 +0300 |
---|---|---|
committer | David Sterba <dsterba@suse.com> | 2020-10-07 12:13:25 +0200 |
commit | 1b36294a6cd50ee5dcfee71ba5241cbb60f0295e (patch) | |
tree | 0139f5ccb738bb5a2e75403ac9df269076c8dca3 /fs/btrfs/extent_io.c | |
parent | 908930f3edad79f7e5e35b7fac09da8c54ca96b5 (diff) |
btrfs: call submit_bio_hook directly for metadata pages
No need to go through a function pointer indirection simply call
submit_bio_hook directly by exporting and renaming the helper to
btrfs_submit_metadata_bio. This makes the code more readable and should
result in somewhat faster code due to no longer paying the price for
specualtive attack mitigations that come with indirect function calls.
Signed-off-by: Nikolay Borisov <nborisov@suse.com>
Reviewed-by: David Sterba <dsterba@suse.com>
Signed-off-by: David Sterba <dsterba@suse.com>
Diffstat (limited to 'fs/btrfs/extent_io.c')
-rw-r--r-- | fs/btrfs/extent_io.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/fs/btrfs/extent_io.c b/fs/btrfs/extent_io.c index bf1cbc171bec..199dcc7d2db6 100644 --- a/fs/btrfs/extent_io.c +++ b/fs/btrfs/extent_io.c @@ -172,8 +172,8 @@ int __must_check submit_one_bio(struct bio *bio, int mirror_num, ret = btrfs_submit_data_bio(tree->private_data, bio, mirror_num, bio_flags); else - ret = tree->ops->submit_bio_hook(tree->private_data, bio, - mirror_num, bio_flags); + ret = btrfs_submit_metadata_bio(tree->private_data, bio, + mirror_num, bio_flags); return blk_status_to_errno(ret); } |