All of lore.kernel.org
 help / color / mirror / Atom feed
From: Laurence Oberman <loberman@redhat.com>
To: Hannes Reinecke <hare@suse.de>,
	"Martin K. Petersen" <martin.petersen@oracle.com>
Cc: Christoph Hellwig <hch@lst.de>,
	James Bottomley <james.bottomley@hansenpartnership.com>,
	linux-scsi@vger.kernel.org
Subject: Re: [PATCH] scsi: return correct status in scsi_host_eh_past_deadline()
Date: Tue, 04 Feb 2020 09:27:47 -0500	[thread overview]
Message-ID: <1c8375b53508e12eff0e0cfd091253d297f85592.camel@redhat.com> (raw)
In-Reply-To: <20200204102316.39000-1-hare@suse.de>

On Tue, 2020-02-04 at 11:23 +0100, Hannes Reinecke wrote:
> If the user changed the 'eh_deadline' setting to 'off' while
> evaluating
> the time_before() call we will return 'true', which is inconsistent
> with the first conditional, where we return 'false' if 'eh_deadline'
> is set to 'off'.
> 
> Reported-by: Martin Wilck <martin.wilck@suse.com>
> Signed-off-by: Hannes Reinecke <hare@suse.de>
> ---
>  drivers/scsi/scsi_error.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/drivers/scsi/scsi_error.c b/drivers/scsi/scsi_error.c
> index ae2fa170f6ad..ae29a9b4af56 100644
> --- a/drivers/scsi/scsi_error.c
> +++ b/drivers/scsi/scsi_error.c
> @@ -113,7 +113,7 @@ static int scsi_host_eh_past_deadline(struct
> Scsi_Host *shost)
>  	    shost->eh_deadline > -1)
>  		return 0;
>  
> -	return 1;
> +	return shost->eh_deadline == -1 ? 0 : 1;
>  }
>  
>  /**

Makes sense, looks right to me.
Reviewed-by: Laurence Oberman <loberman@redhat.com>


  reply	other threads:[~2020-02-04 14:27 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-02-04 10:23 [PATCH] scsi: return correct status in scsi_host_eh_past_deadline() Hannes Reinecke
2020-02-04 14:27 ` Laurence Oberman [this message]
2020-02-04 21:54 ` Ewan D. Milne
2020-02-04 23:24   ` Bart Van Assche
2020-02-04 23:22 ` Bart Van Assche

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1c8375b53508e12eff0e0cfd091253d297f85592.camel@redhat.com \
    --to=loberman@redhat.com \
    --cc=hare@suse.de \
    --cc=hch@lst.de \
    --cc=james.bottomley@hansenpartnership.com \
    --cc=linux-scsi@vger.kernel.org \
    --cc=martin.petersen@oracle.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.