Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 10078
b: refs/heads/master
c: 7c72ce8
h: refs/heads/master
v: v3
  • Loading branch information
Alan Stern authored and James Bottomley committed Oct 16, 2005
1 parent e5cb079 commit ed39687
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 4 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: d16794f6ac8d9b50f62e02a6e6175ae1a30d0ccd
refs/heads/master: 7c72ce81870ded9365f4bc5caa98ef1591dd18dd
7 changes: 4 additions & 3 deletions trunk/drivers/scsi/scsi_lib.c
Original file line number Diff line number Diff line change
Expand Up @@ -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()
Expand Down Expand Up @@ -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;
Expand Down Expand Up @@ -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;
Expand Down

0 comments on commit ed39687

Please sign in to comment.