diff options
author | Nikolay Borisov <nborisov@suse.com> | 2020-09-18 16:34:37 +0300 |
---|---|---|
committer | David Sterba <dsterba@suse.com> | 2020-10-07 13:13:24 +0300 |
commit | 908930f3edad79f7e5e35b7fac09da8c54ca96b5 (patch) | |
tree | b34d81dbd9b82f9120c9f51a666eb5d2d5ab73e9 /fs/btrfs/inode.c | |
parent | be17b3afc4a6255008d4bbf7b1b45a36ac54bece (diff) | |
download | linux-908930f3edad79f7e5e35b7fac09da8c54ca96b5.tar.xz |
btrfs: stop calling submit_bio_hook for data inodes
Instead export and rename the function to btrfs_submit_data_bio and
call it directly in submit_one_bio. This avoids paying the cost for
speculative attacks mitigations and improves code readability.
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/inode.c')
-rw-r--r-- | fs/btrfs/inode.c | 8 |
1 files changed, 3 insertions, 5 deletions
diff --git a/fs/btrfs/inode.c b/fs/btrfs/inode.c index 204cd9d39894..dddff27774a1 100644 --- a/fs/btrfs/inode.c +++ b/fs/btrfs/inode.c @@ -2184,9 +2184,8 @@ static blk_status_t btrfs_submit_bio_start(void *private_data, struct bio *bio, * * c-3) otherwise: async submit */ -static blk_status_t btrfs_submit_bio_hook(struct inode *inode, struct bio *bio, - int mirror_num, - unsigned long bio_flags) +blk_status_t btrfs_submit_data_bio(struct inode *inode, struct bio *bio, + int mirror_num, unsigned long bio_flags) { struct btrfs_fs_info *fs_info = btrfs_sb(inode->i_sb); @@ -10258,8 +10257,7 @@ static const struct file_operations btrfs_dir_file_operations = { }; static const struct extent_io_ops btrfs_extent_io_ops = { - /* mandatory callbacks */ - .submit_bio_hook = btrfs_submit_bio_hook, + .submit_bio_hook = NULL }; /* |