]> bbs.cooldavid.org Git - net-next-2.6.git/blobdiff - drivers/scsi/scsi_lib.c
[SCSI] scsi_lib: Fix bug in completion of bidi commands
[net-next-2.6.git] / drivers / scsi / scsi_lib.c
index e495d3813948900bed56c497ba1649c73be889d3..c6642423cc6758ee5b07349cfffd830d7e45e33f 100644 (file)
@@ -749,9 +749,9 @@ void scsi_io_completion(struct scsi_cmnd *cmd, unsigned int good_bytes)
                         */
                        req->next_rq->resid_len = scsi_in(cmd)->resid;
 
+                       scsi_release_buffers(cmd);
                        blk_end_request_all(req, 0);
 
-                       scsi_release_buffers(cmd);
                        scsi_next_command(cmd);
                        return;
                }
@@ -859,6 +859,7 @@ void scsi_io_completion(struct scsi_cmnd *cmd, unsigned int good_bytes)
                                case 0x07: /* operation in progress */
                                case 0x08: /* Long write in progress */
                                case 0x09: /* self test in progress */
+                               case 0x14: /* space allocation in progress */
                                        action = ACTION_DELAYED_RETRY;
                                        break;
                                default: