[PATCH] cciss: double put_disk()
authorJens Axboe <axboe@suse.de>
Mon, 12 Dec 2005 08:37:13 +0000 (00:37 -0800)
committerLinus Torvalds <torvalds@g5.osdl.org>
Mon, 12 Dec 2005 16:57:43 +0000 (08:57 -0800)
This undoes the put_disk patch I sent in before.

If I had been paying attention I would have seen that we call put_disk
from free_hba during driver unload.  That's the only time we want to
call it.  If it's called from deregister disk we may remove the
controller (cNd0) unintentionally.

Signed-off-by: Mike Miller <mike.miller@hp.com>
Signed-off-by: Jens Axboe <axboe@suse.de>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
drivers/block/cciss.c

index a9e33db46e68b5432627835ea1945f02d40d861c..e34104d32637acf4e055d61d2ec52aba78fdac1d 100644 (file)
@@ -1146,7 +1146,6 @@ static int revalidate_allvol(ctlr_info_t *host)
                                del_gendisk(disk);
                        if (q)
                                blk_cleanup_queue(q);
-                       put_disk(disk);
                }
        }
 
@@ -1467,7 +1466,6 @@ static int deregister_disk(struct gendisk *disk, drive_info_struct *drv,
                                del_gendisk(disk);
                        if (q)  
                                blk_cleanup_queue(q);
-                       put_disk(disk); 
                }
        }
 
@@ -3243,7 +3241,6 @@ static void __devexit cciss_remove_one (struct pci_dev *pdev)
                                del_gendisk(disk);
                        if (q)
                                blk_cleanup_queue(q);
-                       put_disk(disk);
                }
        }