Re: [PATCH 6/9] block_dev: use bio_release_pages in blkdev_bio_end_io

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

 



Looks good.

Reviewed-by: Chaitanya Kulkarni <chaitanya.kulkarni@xxxxxxx>

On 06/26/2019 06:49 AM, Christoph Hellwig wrote:
> Use bio_release_pages instead of duplicating it.
>
> Signed-off-by: Christoph Hellwig <hch@xxxxxx>
> ---
>   fs/block_dev.c | 8 +-------
>   1 file changed, 1 insertion(+), 7 deletions(-)
>
> diff --git a/fs/block_dev.c b/fs/block_dev.c
> index 749f5984425d..a6572a811880 100644
> --- a/fs/block_dev.c
> +++ b/fs/block_dev.c
> @@ -335,13 +335,7 @@ static void blkdev_bio_end_io(struct bio *bio)
>   	if (should_dirty) {
>   		bio_check_pages_dirty(bio);
>   	} else {
> -		if (!bio_flagged(bio, BIO_NO_PAGE_REF)) {
> -			struct bvec_iter_all iter_all;
> -			struct bio_vec *bvec;
> -
> -			bio_for_each_segment_all(bvec, bio, iter_all)
> -				put_page(bvec->bv_page);
> -		}
> +		bio_release_pages(bio, false);
>   		bio_put(bio);
>   	}
>   }
>





[Index of Archives]     [Linux RAID]     [Linux SCSI]     [Linux ATA RAID]     [IDE]     [Linux Wireless]     [Linux Kernel]     [ATH6KL]     [Linux Bluetooth]     [Linux Netdev]     [Kernel Newbies]     [Security]     [Git]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Device Mapper]

  Powered by Linux