From: Guoqing Jiang <guoqing.jiang@linux.dev>
To: axboe@kernel.dk, tim@cyberelk.net, hch@lst.de
Cc: linux-block@vger.kernel.org
Subject: [PATCH] pd: fix order of cleaning up the queue and freeing the tagset
Date: Tue, 6 Jul 2021 09:07:34 +0800 [thread overview]
Message-ID: <20210706010734.1356066-1-guoqing.jiang@linux.dev> (raw)
From: Guoqing Jiang <jiangguoqing@kylinos.cn>
We must release the queue before freeing the tagset.
Fixes: 262d431f9000 ("pd: use blk_mq_alloc_disk and blk_cleanup_disk")
Signed-off-by: Guoqing Jiang <jiangguoqing@kylinos.cn>
---
drivers/block/paride/pd.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/block/paride/pd.c b/drivers/block/paride/pd.c
index 3b2b8e872beb..9b3298926356 100644
--- a/drivers/block/paride/pd.c
+++ b/drivers/block/paride/pd.c
@@ -1014,8 +1014,8 @@ static void __exit pd_exit(void)
if (p) {
disk->gd = NULL;
del_gendisk(p);
- blk_mq_free_tag_set(&disk->tag_set);
blk_cleanup_disk(p);
+ blk_mq_free_tag_set(&disk->tag_set);
pi_release(disk->pi);
}
}
--
2.25.1
next reply other threads:[~2021-07-06 1:08 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-07-06 1:07 Guoqing Jiang [this message]
2021-07-06 4:17 ` [PATCH] pd: fix order of cleaning up the queue and freeing the tagset Christoph Hellwig
2021-07-15 6:58 ` Christoph Hellwig
2021-07-15 15:29 ` Jens Axboe
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20210706010734.1356066-1-guoqing.jiang@linux.dev \
--to=guoqing.jiang@linux.dev \
--cc=axboe@kernel.dk \
--cc=hch@lst.de \
--cc=linux-block@vger.kernel.org \
--cc=tim@cyberelk.net \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox