]> git.baikalelectronics.ru Git - kernel.git/commit
virtio_blk: don't blindly derefence req->rq_disk
authorChristoph Hellwig <hch@lst.de>
Mon, 18 May 2009 12:38:28 +0000 (14:38 +0200)
committerJens Axboe <jens.axboe@oracle.com>
Mon, 18 May 2009 12:38:28 +0000 (14:38 +0200)
commitf414dc86bb204420add4f0c60723358c10d1496e
tree3d48a026a55c615d4072fc4b75dbca20949bad81
parent679d8e187f7d8396455c5cc4531640afdc36f788
virtio_blk: don't blindly derefence req->rq_disk

request->rq_disk is only set for FS requests or BLOCK_PC requests
originating from the generic block layer scsi ioctls.  It's not set
for requests origination from other soures or internal cache flush
commands implemented by the patch I'll send after this.

So instead of using it to get at the private data in do_virtblk_request
setup queue->queuedata and use it.

Signed-off-by: Christoph Hellwig <hch@lst.de>
Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
Signed-off-by: Jens Axboe <jens.axboe@oracle.com>
drivers/block/virtio_blk.c