diff options
author | Daniel Vacek <neelx@redhat.com> | 2024-01-04 21:00:30 +0300 |
---|---|---|
committer | Jens Axboe <axboe@kernel.dk> | 2024-01-05 02:07:56 +0300 |
commit | fab4c16c527e24c804efa4992b3cf40438c9b227 (patch) | |
tree | 0e97a73fe16f963ac4bc1aaa3bc65c2fcada54f1 /block | |
parent | 458aa1a09939a56e044768013c86b5ef06e1c4f1 (diff) | |
download | linux-fab4c16c527e24c804efa4992b3cf40438c9b227.tar.xz |
blk-cgroup: don't use removal safe list iterators
Commit f1c006f1c685 moved deletion of the list blkg->q_node from
blkg_destroy() to blkg_free_workfn(). Switch to using the list
iterators, as we don't need removal protection anymore.
Signed-off-by: Daniel Vacek <neelx@redhat.com>
Acked-by: Tejun Heo <tj@kernel.org>
Link: https://lore.kernel.org/r/20240104180031.148148-1-neelx@redhat.com
Signed-off-by: Jens Axboe <axboe@kernel.dk>
Diffstat (limited to 'block')
-rw-r--r-- | block/blk-cgroup.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/block/blk-cgroup.c b/block/blk-cgroup.c index 58b13ef23821..e303fd317313 100644 --- a/block/blk-cgroup.c +++ b/block/blk-cgroup.c @@ -575,13 +575,13 @@ static void blkg_destroy(struct blkcg_gq *blkg) static void blkg_destroy_all(struct gendisk *disk) { struct request_queue *q = disk->queue; - struct blkcg_gq *blkg, *n; + struct blkcg_gq *blkg; int count = BLKG_DESTROY_BATCH_SIZE; int i; restart: spin_lock_irq(&q->queue_lock); - list_for_each_entry_safe(blkg, n, &q->blkg_list, q_node) { + list_for_each_entry(blkg, &q->blkg_list, q_node) { struct blkcg *blkcg = blkg->blkcg; if (hlist_unhashed(&blkg->blkcg_node)) |