From: James Bottomley <James.Bottomley@SteelEye.com>
To: Andrew Morton <akpm@osdl.org>
Cc: linux-scsi@vger.kernel.org
Subject: Re: git-scsi-misc oops
Date: Wed, 06 Sep 2006 09:00:29 -0500 [thread overview]
Message-ID: <1157551229.3469.4.camel@mulgrave.il.steeleye.com> (raw)
In-Reply-To: <20060905231933.3371cd8a.akpm@osdl.org>
On Tue, 2006-09-05 at 23:19 -0700, Andrew Morton wrote:
> aic79xxx isn't happy. Using
> git+ssh://master.kernel.org/pub/scm/linux/kernel/git/jejb/scsi-misc-2.6.git,
> no other patches applied.
Try this, please:
James
diff --git a/drivers/scsi/scsi.c b/drivers/scsi/scsi.c
index eedfd05..c35f5fc 100644
--- a/drivers/scsi/scsi.c
+++ b/drivers/scsi/scsi.c
@@ -873,10 +873,12 @@ EXPORT_SYMBOL(scsi_device_get);
*/
void scsi_device_put(struct scsi_device *sdev)
{
+ struct module *module = sdev->host->hostt->module;
+
/* The module refcount will be zero if scsi_device_get()
* was called from a module removal routine */
- if (likely(module_refcount(sdev->host->hostt->module) != 0))
- module_put(sdev->host->hostt->module);
+ if (module && module_refcount(module) != 0)
+ module_put(module);
put_device(&sdev->sdev_gendev);
}
EXPORT_SYMBOL(scsi_device_put);
prev parent reply other threads:[~2006-09-06 14:00 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2006-09-06 6:19 git-scsi-misc oops Andrew Morton
2006-09-06 13:52 ` James Bottomley
2006-09-06 14:00 ` James Bottomley [this message]
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=1157551229.3469.4.camel@mulgrave.il.steeleye.com \
--to=james.bottomley@steeleye.com \
--cc=akpm@osdl.org \
--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