fc_transport: Selective return value from BSG timeout function
authorGiridhar Malavali <giridhar.malavali@qlogic.com>
Fri, 19 Jun 2009 23:26:54 +0000 (16:26 -0700)
committerJames Bottomley <James.Bottomley@HansenPartnership.com>
Sun, 21 Jun 2009 16:13:41 +0000 (11:13 -0500)
The return value from BSG timout function should be based on the state of the
BSG job. This helps block layer to take selective actions to clean up BSG job.

Signed-off-by: Giridhar Malavali <giridhar.malavali@qlogic.com>
Acked-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
Signed-off-by: James Bottomley <James.Bottomley@HansenPartnership.com>
drivers/scsi/scsi_transport_fc.c

index 453d9e658eb63db5ee41fca4fbdb9e366ccaf1a2..140c50c8a5d23cc77c6d91a60f05d8a60f9cf403 100644 (file)
@@ -3480,7 +3480,10 @@ fc_bsg_job_timeout(struct request *req)
        }
 
        /* the blk_end_sync_io() doesn't check the error */
-       return BLK_EH_HANDLED;
+       if (done)
+               return BLK_EH_NOT_HANDLED;
+       else
+               return BLK_EH_HANDLED;
 }
 
 static int