public inbox for linux-scsi@vger.kernel.org
 help / color / mirror / Atom feed
From: Patrick Mansfield <patmans@us.ibm.com>
To: Christoph Hellwig <hch@lst.de>
Cc: James.Bottomley@steeleye.com, linux-scsi@vger.kernel.org
Subject: Re: [PATCH] scsi_requeuest_fn
Date: Sun, 27 Apr 2003 11:07:11 -0700	[thread overview]
Message-ID: <20030427110711.A21878@beaverton.ibm.com> (raw)
In-Reply-To: <20030427170440.A29493@lst.de>; from hch@lst.de on Sun, Apr 27, 2003 at 05:04:40PM +0200

On Sun, Apr 27, 2003 at 05:04:40PM +0200, Christoph Hellwig wrote:

> --- 1.84/drivers/scsi/scsi_lib.c	Mon Apr 21 10:17:33 2003
> +++ edited/drivers/scsi/scsi_lib.c	Sun Apr 27 14:19:35 2003
> @@ -1140,66 +1128,61 @@
>   *
>   * Lock status: IO request lock assumed to be held when called.
>   */
> -static void scsi_request_fn(request_queue_t *q)
> +static void scsi_request_fn(struct request_queue *q)
>  {
>  	struct scsi_device *sdev = q->queuedata;
>  	struct Scsi_Host *shost = sdev->host;
>  	struct scsi_cmnd *cmd;
>  	struct request *req;
> -	unsigned long flags;
>  
>  	/*
>  	 * To start with, we keep looping until the queue is empty, or until
>  	 * the host is no longer able to accept any more requests.
>  	 */

You might as well remove all or most of the comments, none of them add
much information, the comments might as well say "we are about to
loop" or "we are about to call scsi_dispatch_cmd".

> -		BUG_ON(!cmd);
> +		spin_unlock_irq(shost->host_lock);
> +
> +		cmd = req->special;
> +		if (unlikely(cmd == NULL)) {
> +			printk(KERN_CRIT "impossible request in %s.\n"
> +					 "please mail a stack trace to "
> +					 "linux-scsi@vger.kernel.org",
> +					 __FUNCTION__);
> +			BUG();
> +		}

The scsi_init_cmd_errh(cmd) will oops anyway if cmd == NULL, so just remove
the check.

Also - do you have a patch rollup somewhere (in case these recent
patches aren't applied soon)?

-- Patrick Mansfield

  reply	other threads:[~2003-04-27 17:58 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2003-04-27 15:04 [PATCH] scsi_requeuest_fn Christoph Hellwig
2003-04-27 18:07 ` Patrick Mansfield [this message]
2003-04-27 18:53   ` Christoph Hellwig
2003-04-28 17:14     ` Patrick Mansfield
2003-04-29  7:45       ` Christoph Hellwig

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=20030427110711.A21878@beaverton.ibm.com \
    --to=patmans@us.ibm.com \
    --cc=James.Bottomley@steeleye.com \
    --cc=hch@lst.de \
    --cc=linux-scsi@vger.kernel.org \
    /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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox