diff options
author | Linus Torvalds <torvalds@g5.osdl.org> | 2005-10-23 17:13:14 -0700 |
---|---|---|
committer | Linus Torvalds <torvalds@g5.osdl.org> | 2005-10-23 17:13:14 -0700 |
commit | ba9e358fd04190a59e605c2963a15e014139a707 (patch) | |
tree | 05b4baf382124a9a0342777127c09832dcbd88c0 /drivers/scsi/scsi_lib.c | |
parent | 75eeec2f3fd9e8a16777219ebf1bf8395845faa7 (diff) | |
parent | 055787e447a6cf50aa1cc42f7d3b07f08223dd9b (diff) | |
download | op-kernel-dev-ba9e358fd04190a59e605c2963a15e014139a707.zip op-kernel-dev-ba9e358fd04190a59e605c2963a15e014139a707.tar.gz |
Merge master.kernel.org:/pub/scm/linux/kernel/git/jejb/scsi-for-linus-2.6
Diffstat (limited to 'drivers/scsi/scsi_lib.c')
-rw-r--r-- | drivers/scsi/scsi_lib.c | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/drivers/scsi/scsi_lib.c b/drivers/scsi/scsi_lib.c index dc9c772..0074f28 100644 --- a/drivers/scsi/scsi_lib.c +++ b/drivers/scsi/scsi_lib.c @@ -97,7 +97,6 @@ int scsi_insert_special_req(struct scsi_request *sreq, int at_head) } static void scsi_run_queue(struct request_queue *q); -static void scsi_release_buffers(struct scsi_cmnd *cmd); /* * Function: scsi_unprep_request() @@ -1040,8 +1039,10 @@ static int scsi_init_io(struct scsi_cmnd *cmd) * if sg table allocation fails, requeue request later. */ sgpnt = scsi_alloc_sgtable(cmd, GFP_ATOMIC); - if (unlikely(!sgpnt)) + if (unlikely(!sgpnt)) { + scsi_unprep_request(req); return BLKPREP_DEFER; + } cmd->request_buffer = (char *) sgpnt; cmd->request_bufflen = req->nr_sectors << 9; @@ -1245,8 +1246,8 @@ static int scsi_prep_fn(struct request_queue *q, struct request *req) */ ret = scsi_init_io(cmd); switch(ret) { + /* For BLKPREP_KILL/DEFER the cmd was released */ case BLKPREP_KILL: - /* BLKPREP_KILL return also releases the command */ goto kill; case BLKPREP_DEFER: goto defer; |