diff options
author | Philip J Kelleher <pjk1939@linux.vnet.ibm.com> | 2013-06-18 15:46:04 -0400 |
---|---|---|
committer | Jens Axboe <axboe@kernel.dk> | 2013-06-19 07:52:09 -0400 |
commit | 66bc600363acd0acae84e878e5a06e7b7a38c014 (patch) | |
tree | a5e0b7bfcb3e178b60b91ca8d4beeca717d24126 | |
parent | f730e3dc6dc4698d55fd9bf6de33a5436900e9bd (diff) |
rsxx: Fixes DLPAR add kernel panic if partition still mounted.
A kernel panic would occur on a DLPAR add if there was a partition
still mounted during the DLPAR remove. This bug fix will allow the
user to unmount the partition and bring the driver back into a
good state after the DLPAR add.
Signed-off-by: Philip J Kelleher <pjk1939@linux.vnet.ibm.com>
Signed-off-by: Jens Axboe <axboe@kernel.dk>
-rw-r--r-- | drivers/block/rsxx/dev.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/drivers/block/rsxx/dev.c b/drivers/block/rsxx/dev.c index 1fa7cccd6866..a092f58db212 100644 --- a/drivers/block/rsxx/dev.c +++ b/drivers/block/rsxx/dev.c | |||
@@ -171,6 +171,9 @@ static void rsxx_make_request(struct request_queue *q, struct bio *bio) | |||
171 | 171 | ||
172 | might_sleep(); | 172 | might_sleep(); |
173 | 173 | ||
174 | if (!card) | ||
175 | goto req_err; | ||
176 | |||
174 | if (unlikely(card->halt)) { | 177 | if (unlikely(card->halt)) { |
175 | st = -EFAULT; | 178 | st = -EFAULT; |
176 | goto req_err; | 179 | goto req_err; |
@@ -331,6 +334,7 @@ void rsxx_destroy_dev(struct rsxx_cardinfo *card) | |||
331 | card->gendisk = NULL; | 334 | card->gendisk = NULL; |
332 | 335 | ||
333 | blk_cleanup_queue(card->queue); | 336 | blk_cleanup_queue(card->queue); |
337 | card->queue->queuedata = NULL; | ||
334 | unregister_blkdev(card->major, DRIVER_NAME); | 338 | unregister_blkdev(card->major, DRIVER_NAME); |
335 | } | 339 | } |
336 | 340 | ||