Re: [RFC PATCH 04/37] btrfs: use bio_init_fields in volumes

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 




On 19.01.21 г. 7:05 ч., Chaitanya Kulkarni wrote:
> Signed-off-by: Chaitanya Kulkarni <chaitanya.kulkarni@xxxxxxx>
> ---
>  fs/btrfs/volumes.c | 4 +---
>  1 file changed, 1 insertion(+), 3 deletions(-)
> 
> diff --git a/fs/btrfs/volumes.c b/fs/btrfs/volumes.c
> index ee086fc56c30..836167212252 100644
> --- a/fs/btrfs/volumes.c
> +++ b/fs/btrfs/volumes.c
> @@ -6371,14 +6371,12 @@ static void submit_stripe_bio(struct btrfs_bio *bbio, struct bio *bio,
>  
>  	bio->bi_private = bbio;
This line can be removed as ->private is initialized by bio_init_fields.

>  	btrfs_io_bio(bio)->device = dev;
> -	bio->bi_end_io = btrfs_end_bio;
> -	bio->bi_iter.bi_sector = physical >> 9;
> +	bio_init_fields(bio, dev->bdev, physical >> 9, bbio, btrfs_end_bio, 0, 0);
>  	btrfs_debug_in_rcu(fs_info,
>  	"btrfs_map_bio: rw %d 0x%x, sector=%llu, dev=%lu (%s id %llu), size=%u",
>  		bio_op(bio), bio->bi_opf, bio->bi_iter.bi_sector,
>  		(unsigned long)dev->bdev->bd_dev, rcu_str_deref(dev->name),
>  		dev->devid, bio->bi_iter.bi_size);
> -	bio_set_dev(bio, dev->bdev);
>  
>  	btrfs_bio_counter_inc_noblocked(fs_info);
>  
> 



[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Linux ARM Kernel]     [Linux Filesystem Development]     [Linux ARM]     [Linux Omap]     [Fedora ARM]     [IETF Annouce]     [Security]     [Bugtraq]     [Linux OMAP]     [Linux MIPS]     [ECOS]     [Asterisk Internet PBX]     [Linux API]

  Powered by Linux