]> git.baikalelectronics.ru Git - kernel.git/commit
block: fix an oops on BLKPREP_KILL
authorJames Bottomley <James.Bottomley@HansenPartnership.com>
Sat, 30 May 2009 04:43:49 +0000 (06:43 +0200)
committerJens Axboe <jens.axboe@oracle.com>
Sat, 30 May 2009 04:43:49 +0000 (06:43 +0200)
commitaab16f7a5c2c24b2efd7ec9a4a65402d097d3b7b
tree6c7d82a398d92e48ee01563a0fc6f9a13ec442e4
parent17d0600dc1e4cf957b68524e31e10e35166af776
block: fix an oops on BLKPREP_KILL

Doing a bit of torture testing, I ran across a BUG in the block
subsystem (at blk-core.c:2048): the test for if the request is queued.

It turns out the trigger was a BLKPREP_KILL coming out of the SCSI prep
function.  Currently for BLKPREP_KILL requests, we send them straight
into __blk_end_request_all() with an error, but they've never been
dequeued, so they trip the bug.  Fix this by starting requests before
killing them.

Signed-off-by: James Bottomley <James.Bottomley@HansenPartnership.com>
Signed-off-by: Jens Axboe <jens.axboe@oracle.com>
block/blk-core.c