aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/block
diff options
context:
space:
mode:
authorAndrew Patterson <andrew.patterson@hp.com>2009-09-17 14:46:53 -0400
committerJens Axboe <jens.axboe@oracle.com>2009-10-01 15:15:40 -0400
commitc64bebcd7f33a6260b6d4c9999f797a633a3fa1c (patch)
tree2638cacd891903a765062fb188a66bfcb6e7061b /drivers/block
parent4d761609471f7e543c880dd47ef5e1669076081b (diff)
cciss: Remove sysfs entries for logical drives on driver cleanup.
Sysfs entries for logical drives need to be removed when a drive is deleted during driver cleanup. Signed-off-by: Andrew Patterson <andrew.patterson@hp.com> Signed-off-by: Stephen M. Cameron <scameron@beardog.cce.hp.com> Acked-by: Mike Miller <mike.miller@hp.com> Signed-off-by: Jens Axboe <jens.axboe@oracle.com>
Diffstat (limited to 'drivers/block')
-rw-r--r--drivers/block/cciss.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/drivers/block/cciss.c b/drivers/block/cciss.c
index b890f8b3c09..f162f96c36e 100644
--- a/drivers/block/cciss.c
+++ b/drivers/block/cciss.c
@@ -1978,7 +1978,6 @@ static int rebuild_lun_table(ctlr_info_t *h, int first_time)
1978 h->drv[i].busy_configuring = 1; 1978 h->drv[i].busy_configuring = 1;
1979 spin_unlock_irqrestore(CCISS_LOCK(h->ctlr), flags); 1979 spin_unlock_irqrestore(CCISS_LOCK(h->ctlr), flags);
1980 return_code = deregister_disk(h, i, 1); 1980 return_code = deregister_disk(h, i, 1);
1981 cciss_destroy_ld_sysfs_entry(&h->drv[i]);
1982 h->drv[i].busy_configuring = 0; 1981 h->drv[i].busy_configuring = 0;
1983 } 1982 }
1984 } 1983 }
@@ -2119,6 +2118,7 @@ static int deregister_disk(ctlr_info_t *h, int drv_index,
2119 * indicate that this element of the drive 2118 * indicate that this element of the drive
2120 * array is free. 2119 * array is free.
2121 */ 2120 */
2121 cciss_destroy_ld_sysfs_entry(drv);
2122 2122
2123 if (clear_all) { 2123 if (clear_all) {
2124 /* check to see if it was the last disk */ 2124 /* check to see if it was the last disk */
@@ -4142,6 +4142,9 @@ static void __devexit cciss_remove_one(struct pci_dev *pdev)
4142 if (q) 4142 if (q)
4143 blk_cleanup_queue(q); 4143 blk_cleanup_queue(q);
4144 } 4144 }
4145 if (hba[i]->drv[j].raid_level != -1)
4146 cciss_destroy_ld_sysfs_entry(&hba[i]->drv[j]);
4147
4145 } 4148 }
4146 4149
4147#ifdef CONFIG_CISS_SCSI_TAPE 4150#ifdef CONFIG_CISS_SCSI_TAPE