Re: [PATCH 15/17] blk-cgroup: pass a gendisk to blkg_destroy_all

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

 



On Wed, Sep 21, 2022 at 08:04:59PM +0200, Christoph Hellwig wrote:
> Pass the gendisk to blkg_destroy_all as part of moving the blk-cgroup
> infrastructure to be gendisk based.
> 
> Signed-off-by: Christoph Hellwig <hch@xxxxxx>
> ---
>  block/blk-cgroup.c | 13 ++++---------
>  1 file changed, 4 insertions(+), 9 deletions(-)

Reviewed-by: Andreas Herrmann <aherrmann@xxxxxxx>

> diff --git a/block/blk-cgroup.c b/block/blk-cgroup.c
> index 3dfd78f1312db..c2d5ca2eb92e5 100644
> --- a/block/blk-cgroup.c
> +++ b/block/blk-cgroup.c
> @@ -462,14 +462,9 @@ static void blkg_destroy(struct blkcg_gq *blkg)
>  	percpu_ref_kill(&blkg->refcnt);
>  }
>  
> -/**
> - * blkg_destroy_all - destroy all blkgs associated with a request_queue
> - * @q: request_queue of interest
> - *
> - * Destroy all blkgs associated with @q.
> - */
> -static void blkg_destroy_all(struct request_queue *q)
> +static void blkg_destroy_all(struct gendisk *disk)
>  {
> +	struct request_queue *q = disk->queue;
>  	struct blkcg_gq *blkg, *n;
>  	int count = BLKG_DESTROY_BATCH_SIZE;
>  
> @@ -1276,7 +1271,7 @@ int blkcg_init_disk(struct gendisk *disk)
>  err_ioprio_exit:
>  	blk_ioprio_exit(disk);
>  err_destroy_all:
> -	blkg_destroy_all(q);
> +	blkg_destroy_all(disk);
>  	return ret;
>  err_unlock:
>  	spin_unlock_irq(&q->queue_lock);
> @@ -1287,7 +1282,7 @@ int blkcg_init_disk(struct gendisk *disk)
>  
>  void blkcg_exit_disk(struct gendisk *disk)
>  {
> -	blkg_destroy_all(disk->queue);
> +	blkg_destroy_all(disk);
>  	blk_throtl_exit(disk);
>  }
>  
> -- 
> 2.30.2
> 

-- 
Regards,
Andreas

SUSE Software Solutions Germany GmbH
Frankenstrasse 146, 90461 Nürnberg, Germany
GF: Ivo Totev, Andrew Myers, Andrew McDonald, Martje Boudien Moerman
(HRB 36809, AG Nürnberg)



[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