> +++ b/block/blk-core.c > @@ -2462,9 +2462,13 @@ struct request *blk_peek_request(struct request_queue *q) > > rq = NULL; > break; > - } else if (ret == BLKPREP_KILL || ret == BLKPREP_INVALID) { > + } else if (ret == BLKPREP_KILL || ret == BLKPREP_INVALID || > + ret == BLKPREP_DONE) { > int err = (ret == BLKPREP_INVALID) ? -EREMOTEIO : -EIO; > > + if (ret == BLKPREP_DONE) > + err = 0; > + Please just use a proper switch statement for the return values. static void blk_prep_end_request(struct request *req, int error) { rq->cmd_flags |= REQ_QUIET; blk_start_request(rq); __blk_end_request_all(rq, error); } struct request *blk_peek_request(struct request_queue *q) { ... switch (ret) { ... case BLKPREP_KILL: blk_prep_end_request(rq, -EIO); break; case BLKPREP_INVALID: blk_prep_end_request(rq, -EREMOTEIO); break; case BLKPREP_DONE: blk_prep_end_request(rq, 0); break; ... } -- To unsubscribe from this list: send the line "unsubscribe linux-scsi" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html