On Tue, 2016-05-10 at 23:43 -0700, James Bottomley wrote:
> On Wed, 2016-05-11 at 08:21 +0200, Hannes Reinecke wrote:
[..]
> > diff --git a/drivers/scsi/scsi_lib.c b/drivers/scsi/scsi_lib.c
> > index 7cb66b0..68c0e74 100644
> > --- a/drivers/scsi/scsi_lib.c
> > +++ b/drivers/scsi/scsi_lib.c
> > @@ -693,7 +693,7 @@ static bool scsi_end_request(struct request
> > *req, int error,
> >         struct scsi_device *sdev = cmd->device;
> >         struct request_queue *q = sdev->request_queue;
> > 
> > -       if (blk_update_request(req, error, bytes))
> > +       if (bytes && blk_update_request(req, error, bytes))
> >                 return true;
> 
> Um, I think you mean 
> 
> if (bytes == 0 || blk_update_request())

Actually, even this would be wrong.  We expect scsi_end_request called
with blk_rq_bytes() to complete the request and return false.  If you
do the above, it won't and we'll trigger a BUG lower down (or retry
forever).

James


--
To unsubscribe from this list: send the line "unsubscribe linux-scsi" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Reply via email to