Skip to content

Commit

Permalink
cciss: Remove sysfs entries for logical drives on driver cleanup.
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Andrew Patterson authored and Jens Axboe committed Oct 1, 2009
1 parent 4d76160 commit c64bebc
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion drivers/block/cciss.c
Original file line number Diff line number Diff line change
Expand Up @@ -1978,7 +1978,6 @@ static int rebuild_lun_table(ctlr_info_t *h, int first_time)
h->drv[i].busy_configuring = 1;
spin_unlock_irqrestore(CCISS_LOCK(h->ctlr), flags);
return_code = deregister_disk(h, i, 1);
cciss_destroy_ld_sysfs_entry(&h->drv[i]);
h->drv[i].busy_configuring = 0;
}
}
Expand Down Expand Up @@ -2119,6 +2118,7 @@ static int deregister_disk(ctlr_info_t *h, int drv_index,
* indicate that this element of the drive
* array is free.
*/
cciss_destroy_ld_sysfs_entry(drv);

if (clear_all) {
/* check to see if it was the last disk */
Expand Down Expand Up @@ -4142,6 +4142,9 @@ static void __devexit cciss_remove_one(struct pci_dev *pdev)
if (q)
blk_cleanup_queue(q);
}
if (hba[i]->drv[j].raid_level != -1)
cciss_destroy_ld_sysfs_entry(&hba[i]->drv[j]);

}

#ifdef CONFIG_CISS_SCSI_TAPE
Expand Down

0 comments on commit c64bebc

Please sign in to comment.