Patch "blk-cgroup: pass a gendisk to blkg_destroy_all" has been added to the 6.0-stable tree

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

 



This is a note to let you know that I've just added the patch titled

    blk-cgroup: pass a gendisk to blkg_destroy_all

to the 6.0-stable tree which can be found at:
    http://www.kernel.org/git/?p=linux/kernel/git/stable/stable-queue.git;a=summary

The filename of the patch is:
     blk-cgroup-pass-a-gendisk-to-blkg_destroy_all.patch
and it can be found in the queue-6.0 subdirectory.

If you, or anyone else, feels it should not be added to the stable tree,
please let <stable@xxxxxxxxxxxxxxx> know about it.



commit 34d1ff832bd95f54409c053df67ccbb22f9f78d6
Author: Christoph Hellwig <hch@xxxxxx>
Date:   Wed Sep 21 20:04:59 2022 +0200

    blk-cgroup: pass a gendisk to blkg_destroy_all
    
    [ Upstream commit 00ad6991bbae116b7c83f68754edd6f4d5e65e01 ]
    
    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>
    Reviewed-by: Andreas Herrmann <aherrmann@xxxxxxx>
    Acked-by: Tejun Heo <tj@xxxxxxxxxx>
    Link: https://lore.kernel.org/r/20220921180501.1539876-16-hch@xxxxxx
    Signed-off-by: Jens Axboe <axboe@xxxxxxxxx>
    Stable-dep-of: 813e693023ba ("blk-iolatency: Fix memory leak on add_disk() failures")
    Signed-off-by: Sasha Levin <sashal@xxxxxxxxxx>

diff --git a/block/blk-cgroup.c b/block/blk-cgroup.c
index afe802e1180f..cd682fe46d2f 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;
 
@@ -1292,7 +1287,7 @@ int blkcg_init_disk(struct gendisk *disk)
 err_ioprio_exit:
 	blk_ioprio_exit(q);
 err_destroy_all:
-	blkg_destroy_all(q);
+	blkg_destroy_all(disk);
 	return ret;
 err_unlock:
 	spin_unlock_irq(&q->queue_lock);
@@ -1303,7 +1298,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);
 }
 



[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux