Skip to contentSkip to conversation

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

PATCH Applied Guoqing Jiang 4 participants 4 messages Jul 6, 2021 – Jul 15, 2021 Block layer

v1 of 2 Applied Latest is v2 →

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 pd: fix order of cleaning up the queue and freeing the tagset

From: Guoqing Jiang <[email protected]>

We must release the queue before freeing the tagset.

Fixes 262d431f9000 ("pd: use blk_mq_alloc_disk and blk_cleanup_disk")
---
 drivers/block/paride/pd.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/block/paride/pd.c +1 -1
index 3b2b8e872beb..9b3298926356 100644
@@ -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);
 		}
 	}
Signature · 1 line
2.25.1
#2 lore raw
In reply to Guoqing Jiang

Jens, can you pick this one up?

Quoted 27 lines · Guoqing Jiang

From: Guoqing Jiang <[email protected]>

We must release the queue before freeing the tagset.

Fixes 262d431f9000 ("pd: use blk_mq_alloc_disk and blk_cleanup_disk")
---
 drivers/block/paride/pd.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/block/paride/pd.c +1 -1
index 3b2b8e872beb..9b3298926356 100644
@@ -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);
 		}
 	}
Signature · 1 line
2.25.1

---end quoted text---