summaryrefslogtreecommitdiffstats
path: root/block/blk-cgroup.c
diff options
context:
space:
mode:
authorMing Lei <ming.lei@redhat.com>2022-02-11 18:11:48 +0800
committerJens Axboe <axboe@kernel.dk>2022-02-11 10:02:41 -0700
commit472e4314c039d6cf36e28783b1c63f87b5b394c2 (patch)
treec8835350aa9310733547fccbd86d20022b7aea7e /block/blk-cgroup.c
parent0e51e2ab49a99bc5077760aa083dfa1c3bf9899b (diff)
downloadlinux-stable-472e4314c039d6cf36e28783b1c63f87b5b394c2.tar.gz
linux-stable-472e4314c039d6cf36e28783b1c63f87b5b394c2.tar.bz2
linux-stable-472e4314c039d6cf36e28783b1c63f87b5b394c2.zip
block: move initialization of q->blkg_list into blkcg_init_queue
q->blkg_list is only used by blkcg code, so move it into blkcg_init_queue. Reviewed-by: Christoph Hellwig <hch@lst.de> Reviewed-by: Bart Van Assche <bvanassche@acm.org> Signed-off-by: Ming Lei <ming.lei@redhat.com> Link: https://lore.kernel.org/r/20220211101149.2368042-3-ming.lei@redhat.com Signed-off-by: Jens Axboe <axboe@kernel.dk>
Diffstat (limited to 'block/blk-cgroup.c')
-rw-r--r--block/blk-cgroup.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/block/blk-cgroup.c b/block/blk-cgroup.c
index 671debbae941..35deaceba1f0 100644
--- a/block/blk-cgroup.c
+++ b/block/blk-cgroup.c
@@ -1175,6 +1175,8 @@ int blkcg_init_queue(struct request_queue *q)
bool preloaded;
int ret;
+ INIT_LIST_HEAD(&q->blkg_list);
+
new_blkg = blkg_alloc(&blkcg_root, q, GFP_KERNEL);
if (!new_blkg)
return -ENOMEM;