Skip to contentSkip to conversation

rsxx: Removing IDA on driver unload.

PATCH New Philip J. Kelleher 1 participant 1 message Aug 14, 2013 Block layer

lore
Share & tools
lore
#0 lore raw

PATCH 4/5 rsxx: Removing IDA on driver unload.

From: Philip J Kelleher <[email protected]>

The rsxx driver was not releasing the IDA entry during driver unload. This would be a big problem on a DLPAR remove where the card is remove from the LPAR but the driver is still loaded. This patch fixes that issue.

-------------------------------------------------------------------------------

drivers/block/rsxx/core.c +4 -0
diff -uprN -X linux-block-vanilla/Documentation/dontdiff linux-block-vanilla/drivers/block/rsxx/core.c linux-block/drivers/block/rsxx/core.c
@@ -1101,6 +1101,10 @@ static void rsxx_pci_remove(struct pci_d
 	pci_disable_device(dev);
 	pci_release_regions(dev);
 
+	spin_lock(&rsxx_ida_lock);
+	ida_remove(&rsxx_disk_ida, card->disk_id);
+	spin_unlock(&rsxx_ida_lock);
+
 	kfree(card);
 }