All of lore.kernel.org
 help / color / mirror / Atom feed
From: Andy Whitcroft <apw@shadowen.org>
To: Andrew Morton <akpm@osdl.org>, James.Bottomley@SteelEye.com
Cc: linux-kernel@vger.kernel.org, linux-scsi@vger.kernel.org
Subject: [PATCH] BODGE scsi misc module reference count checks with no MODULE_UNLOAD
Date: Tue, 12 Sep 2006 10:02:24 +0100	[thread overview]
Message-ID: <20060912090223.GA31576@shadowen.org> (raw)
In-Reply-To: 45067632.4020906@shadowen.org

BODGE scsi misc module reference count checks with no MODULE_UNLOAD

A quick bodge to try and get this to compile for testing.

Signed-off-by: Andy Whitcroft <apw@shadowen.org>
---
diff --git a/drivers/scsi/scsi.c b/drivers/scsi/scsi.c
index 20d2cdf..2acc0cb 100644
--- a/drivers/scsi/scsi.c
+++ b/drivers/scsi/scsi.c
@@ -884,7 +884,11 @@ void scsi_device_put(struct scsi_device 
 
 	/* The module refcount will be zero if scsi_device_get()
 	 * was called from a module removal routine */
-	if (module && module_refcount(module) != 0)
+	if (module
+#ifdef CONFIG_MODULE_UNLOAD
+			&& module_refcount(module) != 0
+#endif
+			)
 		module_put(module);
 	put_device(&sdev->sdev_gendev);
 }

  reply	other threads:[~2006-09-12  9:03 UTC|newest]

Thread overview: 58+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2006-09-12  7:06 2.6.18-rc6-mm2 Andrew Morton
2006-09-12  8:56 ` 2.6.18-rc6-mm2 Andy Whitcroft
2006-09-12  9:02   ` Andy Whitcroft [this message]
2006-09-12  9:19     ` [PATCH] BODGE scsi misc module reference count checks with no MODULE_UNLOAD Helge Hafting
2006-09-12  9:24 ` 2.6.18-rc6-mm2 Michal Piotrowski
2006-09-12 12:54 ` 2.6.18-rc6-mm2 Michal Piotrowski
2006-09-12 15:42   ` 2.6.18-rc6-mm2 Michal Piotrowski
2006-09-12 23:25     ` 2.6.18-rc6-mm2 Andrew Morton
2006-09-12 23:34       ` 2.6.18-rc6-mm2 Michal Piotrowski
2006-09-12 23:37         ` 2.6.18-rc6-mm2 Andrew Morton
2006-09-13  1:58           ` [xfs-masters] 2.6.18-rc6-mm2 David Chinner
2006-09-13  4:26             ` David Chinner
2006-09-13  9:43               ` Michal Piotrowski
2006-09-14  3:59                 ` David Chinner
2006-09-14  8:37                   ` Michal Piotrowski
2006-09-14  8:50                     ` Michal Piotrowski
2006-09-14  8:55                       ` Michal Piotrowski
2006-09-14  9:08                       ` David Chinner
2006-09-14  9:29                         ` Michal Piotrowski
2006-09-14 10:03                           ` Michal Piotrowski
2006-09-14 17:01                             ` Michal Piotrowski
2006-09-15  2:57                               ` David Chinner
2006-09-15  3:48                                 ` Andrew Morton
2006-09-15  5:58                                   ` David Chinner
2006-09-15  8:06                                     ` Michal Piotrowski
2006-09-17 23:01                                       ` David Chinner
2006-09-12 19:11 ` 2.6.18-rc6-mm2 Michal Piotrowski
2006-09-12 22:03   ` 2.6.18-rc6-mm2 Jiri Slaby
2006-09-12 22:14     ` 2.6.18-rc6-mm2 Jiri Slaby
2006-09-12 20:05 ` [-mm patch] arm build fail: vfpsingle.c Frederik Deweerdt
2006-09-12 18:27   ` Zach Brown
2006-09-12 21:00     ` Frederik Deweerdt
2006-09-12 19:07       ` Zach Brown
2006-09-12 21:31         ` Frederik Deweerdt
2006-09-13 13:58 ` 2.6.18-rc6-mm2: rmmod ohci_hcd oopses on HPC 6325 Rafael J. Wysocki
2006-09-13 16:36   ` Rafael J. Wysocki
2006-09-13 18:44   ` Alan Stern
2006-09-13 19:24     ` Rafael J. Wysocki
2006-09-13 22:31     ` Pete Zaitcev
2006-09-14 11:19       ` Rafael J. Wysocki
2006-09-15 22:45         ` Pete Zaitcev
2006-09-16 23:02           ` Rafael J. Wysocki
2006-09-19  3:21           ` David Brownell
2006-09-14 11:11 ` 2.6.18-rc6-mm2 Michal Piotrowski
2006-09-14 15:47   ` 2.6.18-rc6-mm2 Andrew Morton
2006-09-14 21:40   ` 2.6.18-rc6-mm2 Greg KH
2006-09-14 22:17     ` 2.6.18-rc6-mm2 Michal Piotrowski
2006-09-14 22:36       ` 2.6.18-rc6-mm2 Greg KH
2006-09-15 20:35         ` 2.6.18-rc6-mm2 Michal Piotrowski
2006-09-15 21:50           ` 2.6.18-rc6-mm2 Greg KH
2006-09-16 12:14             ` 2.6.18-rc6-mm2 Michal Piotrowski
2006-09-17 16:05               ` 2.6.18-rc6-mm2 Greg KH
2006-09-17  9:29 ` 2.6.18-rc6-mm2: __fscache_register_netfs compile error Christian Kujau
2006-09-17  9:37   ` Christian Kujau
2006-09-22 10:33   ` David Howells
2006-09-22 10:39   ` David Howells
2006-09-23 20:38     ` Christian Kujau
2006-09-26  6:58       ` Christian Kujau

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=20060912090223.GA31576@shadowen.org \
    --to=apw@shadowen.org \
    --cc=James.Bottomley@SteelEye.com \
    --cc=akpm@osdl.org \
    --cc=linux-kernel@vger.kernel.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 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.