[SCSI] libosd: Bugfix of error handling in attributes-list decoding
authorBoaz Harrosh <bharrosh@panasas.com>
Mon, 16 Nov 2009 18:47:47 +0000 (20:47 +0200)
committerJames Bottomley <James.Bottomley@suse.de>
Fri, 4 Dec 2009 18:01:47 +0000 (12:01 -0600)
When an error was detected in an attribute list do to
a target bug. We would print an error but spin endlessly
regardless. Fix it.

Signed-off-by: Boaz Harrosh <bharrosh@panasas.com>
Signed-off-by: James Bottomley <James.Bottomley@suse.de>
drivers/scsi/osd/osd_initiator.c

index 5e90d19..ba25b1e 100644 (file)
@@ -1167,6 +1167,7 @@ int osd_req_decode_get_attr_list(struct osd_request *or,
                                "c=%d r=%d n=%d\n",
                                cur_bytes, returned_bytes, n);
                        oa->val_ptr = NULL;
+                       cur_bytes = returned_bytes; /* break the caller loop */
                        break;
                }