[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 5e90d19fddf84932ace9870d2116fdc0c0b48fea..ba25b1e58a6c5a166a6b1509943ead9dd0f4a6a7 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;
                }