Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 349569
b: refs/heads/master
c: 58c49df
h: refs/heads/master
i:
  349567: f1ecf23
v: v3
  • Loading branch information
Asai Thambi S P authored and Jens Axboe committed Jan 11, 2013
1 parent 857e9ae commit ab8c658
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 3 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 47cd4b3c7e80cc8d5ac82930c5af835870b5aba1
refs/heads/master: 58c49df378cde4ff64172483d593a1a5689c13a8
15 changes: 13 additions & 2 deletions trunk/drivers/block/mtip32xx/mtip32xx.c
Original file line number Diff line number Diff line change
Expand Up @@ -3888,7 +3888,12 @@ static int mtip_block_remove(struct driver_data *dd)
* Delete our gendisk structure. This also removes the device
* from /dev
*/
del_gendisk(dd->disk);
if (dd->disk) {
if (dd->disk->queue)
del_gendisk(dd->disk);
else
put_disk(dd->disk);
}

spin_lock(&rssd_index_lock);
ida_remove(&rssd_index_ida, dd->index);
Expand Down Expand Up @@ -3922,7 +3927,13 @@ static int mtip_block_shutdown(struct driver_data *dd)
"Shutting down %s ...\n", dd->disk->disk_name);

/* Delete our gendisk structure, and cleanup the blk queue. */
del_gendisk(dd->disk);
if (dd->disk) {
if (dd->disk->queue)
del_gendisk(dd->disk);
else
put_disk(dd->disk);
}


spin_lock(&rssd_index_lock);
ida_remove(&rssd_index_ida, dd->index);
Expand Down

0 comments on commit ab8c658

Please sign in to comment.