From 87d38ebe74592d9cd955e584f3e72be6955bfede Mon Sep 17 00:00:00 2001 From: Bart Van Assche Date: Thu, 3 Jun 2021 14:47:04 -0700 Subject: [PATCH] FROMGIT: block/blk-cgroup: Swap the blk_throtl_init() and blk_iolatency_init() calls Before adding more calls in this function, simplify the error path. Reviewed-by: Damien Le Moal Reviewed-by: Johannes Thumshirn Reviewed-by: Hannes Reinecke Cc: Tejun Heo Cc: Christoph Hellwig Cc: Ming Lei Cc: Himanshu Madhani Signed-off-by: Bart Van Assche BUG: 187357408 Change-Id: I8568b87d1bebbd3841e42a79b7efe2d0a1bff2bc (cherry picked from commit f1a7f539c2720906fb10be0af3514b034e1a9fee git://git.kernel.dk/linux-block/ for-5.14/block) Signed-off-by: Bart Van Assche --- block/blk-cgroup.c | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/block/blk-cgroup.c b/block/blk-cgroup.c index f13688c4b931..44be26e62ca4 100644 --- a/block/blk-cgroup.c +++ b/block/blk-cgroup.c @@ -1181,15 +1181,14 @@ int blkcg_init_queue(struct request_queue *q) if (preloaded) radix_tree_preload_end(); + ret = blk_iolatency_init(q); + if (ret) + goto err_destroy_all; + ret = blk_throtl_init(q); if (ret) goto err_destroy_all; - ret = blk_iolatency_init(q); - if (ret) { - blk_throtl_exit(q); - goto err_destroy_all; - } return 0; err_destroy_all: