From: James Bottomley <James.Bottomley@suse.de>
To: Hillf Danton <dhillf@gmail.com>
Cc: James Smart <james.smart@emulex.com>,
linux-scsi@vger.kernel.org, Mike Christie <michaelc@cs.wisc.edu>,
FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
Subject: Re: [PATCH] SCSI: remove noop in fc_bsg_goose_queue()
Date: Tue, 21 Sep 2010 10:41:22 -0500 [thread overview]
Message-ID: <1285083682.16440.36.camel@mulgrave.site> (raw)
In-Reply-To: <AANLkTi=LeDERNV8ij6Jj+Z5cT8PRhd+4UqyzBRiBRcP+@mail.gmail.com>
On Tue, 2010-09-21 at 23:19 +0800, Hillf Danton wrote:
> The tests for QUEUE_FLAG_REENTER seem unnecessary.
> And check for get_device() is added.
OK, so you've done a few newbie patches; it's time to graduate.
> Signed-off-by: Hillf Danton <dhillf@gmail.com>
> ---
>
> --- o/linux-2.6.36-rc4/drivers/scsi/scsi_transport_fc.c 2010-09-13
> 07:07:38.000000000 +0800
> +++ m/linux-2.6.36-rc4/drivers/scsi/scsi_transport_fc.c 2010-09-21
> 22:05:38.000000000 +0800
> @@ -3766,16 +3766,11 @@ fc_bsg_goose_queue(struct fc_rport *rpor
> if (!rport->rqst_q)
> return;
>
> - get_device(&rport->dev);
> + if (! get_device(&rport->dev))
> + return;
The expression in the if clause is never true ... can you tell me why?
> spin_lock_irqsave(rport->rqst_q->queue_lock, flags);
> - flagset = test_bit(QUEUE_FLAG_REENTER, &rport->rqst_q->queue_flags) &&
> - !test_bit(QUEUE_FLAG_REENTER, &rport->rqst_q->queue_flags);
> - if (flagset)
> - queue_flag_set(QUEUE_FLAG_REENTER, rport->rqst_q);
> __blk_run_queue(rport->rqst_q);
> - if (flagset)
> - queue_flag_clear(QUEUE_FLAG_REENTER, rport->rqst_q);
> spin_unlock_irqrestore(rport->rqst_q->queue_lock, flags);
this code doesn't do anything because there's a bug in it. If you can
work out what it's trying to do, you should be able to fix the bug.
James
next prev parent reply other threads:[~2010-09-21 16:02 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-09-21 15:19 [PATCH] SCSI: remove noop in fc_bsg_goose_queue() Hillf Danton
2010-09-21 15:41 ` James Bottomley [this message]
2010-09-21 17:35 ` Hillf Danton
2010-09-23 15:10 ` Hillf Danton
2010-09-26 22:58 ` James Bottomley
2010-10-01 2:30 ` Hillf Danton
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=1285083682.16440.36.camel@mulgrave.site \
--to=james.bottomley@suse.de \
--cc=dhillf@gmail.com \
--cc=fujita.tomonori@lab.ntt.co.jp \
--cc=james.smart@emulex.com \
--cc=linux-scsi@vger.kernel.org \
--cc=michaelc@cs.wisc.edu \
/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