[PATCH] pd: fix order of cleaning up the queue and freeing the tagset

Subsystems: block layer, the rest

STALE1927d LANDED

Landed in mainline as 58b63e0f556c on 2021-07-15.

4 messages, 4 authors, 2021-07-15 · open the first message on its own page

[PATCH] pd: fix order of cleaning up the queue and freeing the tagset

From: Guoqing Jiang <hidden>
Date: 2021-07-06 01:08:03

From: Guoqing Jiang <redacted>

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 <redacted>
---
 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

Re: [PATCH] pd: fix order of cleaning up the queue and freeing the tagset

From: Christoph Hellwig <hch@lst.de>
Date: 2021-07-06 04:17:08

On Tue, Jul 06, 2021 at 09:07:34AM +0800, Guoqing Jiang wrote:
From: Guoqing Jiang <redacted>

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 <redacted>
Looks good,

Reviewed-by: Christoph Hellwig <hch@lst.de>

Re: [PATCH] pd: fix order of cleaning up the queue and freeing the tagset

From: Christoph Hellwig <hch@infradead.org>
Date: 2021-07-15 06:58:56

Jens, can you pick this one up?

On Tue, Jul 06, 2021 at 09:07:34AM +0800, Guoqing Jiang wrote:
quoted hunk
From: Guoqing Jiang <redacted>

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 <redacted>
---
 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
---end quoted text---

Re: [PATCH] pd: fix order of cleaning up the queue and freeing the tagset

From: Jens Axboe <axboe@kernel.dk>
Date: 2021-07-15 15:29:37

On 7/5/21 7:07 PM, Guoqing Jiang wrote:
From: Guoqing Jiang <redacted>

We must release the queue before freeing the tagset.
Applied, thanks.

-- 
Jens Axboe
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help