diff options
author | FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp> | 2010-07-03 10:07:04 -0400 |
---|---|---|
committer | Jens Axboe <jaxboe@fusionio.com> | 2010-08-07 12:24:15 -0400 |
commit | 82b6d57fb11644fe25c8a1346627ad0027673dae (patch) | |
tree | 0270b7eb3e995f88cbe1e8626153af15a5cc05d8 /drivers/scsi/sd.c | |
parent | 00fff26539bfe3fad21c164fc4002d9ede056fb0 (diff) |
scsi: need to reset unprep_rq_fn in sd_remove
This is for block's for-2.6.36.
We need to reset q->unprep_rq_fn in sd_remove. Otherwise we hit kernel
oops if we access to a scsi disk device via sg after removing scsi
disk module.
Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
Signed-off-by: Jens Axboe <jaxboe@fusionio.com>
Diffstat (limited to 'drivers/scsi/sd.c')
-rw-r--r-- | drivers/scsi/sd.c | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/drivers/scsi/sd.c b/drivers/scsi/sd.c index d9a4314a1948..0994ab63b598 100644 --- a/drivers/scsi/sd.c +++ b/drivers/scsi/sd.c | |||
@@ -2384,6 +2384,7 @@ static int sd_remove(struct device *dev) | |||
2384 | async_synchronize_full(); | 2384 | async_synchronize_full(); |
2385 | sdkp = dev_get_drvdata(dev); | 2385 | sdkp = dev_get_drvdata(dev); |
2386 | blk_queue_prep_rq(sdkp->device->request_queue, scsi_prep_fn); | 2386 | blk_queue_prep_rq(sdkp->device->request_queue, scsi_prep_fn); |
2387 | blk_queue_unprep_rq(sdkp->device->request_queue, NULL); | ||
2387 | device_del(&sdkp->dev); | 2388 | device_del(&sdkp->dev); |
2388 | del_gendisk(sdkp->disk); | 2389 | del_gendisk(sdkp->disk); |
2389 | sd_shutdown(dev); | 2390 | sd_shutdown(dev); |