mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* [PATCH -mm] scsi: compile error on module_refcount
@ 2006-09-09 16:26 dwalker
  2006-09-09 16:31 ` Daniel Walker
  0 siblings, 1 reply; 3+ messages in thread
From: dwalker @ 2006-09-09 16:26 UTC (permalink / raw)
  To: akpm; +Cc: linux-kernel, James.Bottomley

Fixes the following compile error,

  LD      .tmp_vmlinux1
drivers/built-in.o(.text+0x8e1f9): In function `scsi_device_put':
drivers/scsi/scsi.c:887: undefined reference to `module_refcount'
make: *** [.tmp_vmlinux1] Error 1

There are only two users of module_refcount() outside of kernel/module.c
and the other one uses ifdef's similar to this.

---
 drivers/scsi/scsi.c |    2 ++
 1 files changed, 2 insertions(+)

Index: linux-2.6.17/drivers/scsi/scsi.c
===================================================================
--- linux-2.6.17.orig/drivers/scsi/scsi.c
+++ linux-2.6.17/drivers/scsi/scsi.c
@@ -882,10 +882,12 @@ void scsi_device_put(struct scsi_device 
 {
 	struct module *module = sdev->host->hostt->module;
 
+#ifdef CONFIG_MODULE_UNLOAD
 	/* The module refcount will be zero if scsi_device_get()
 	 * was called from a module removal routine */
 	if (module && module_refcount(module) != 0)
 		module_put(module);
+#endif
 	put_device(&sdev->sdev_gendev);
 }
 EXPORT_SYMBOL(scsi_device_put);
--

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [PATCH -mm] scsi: compile error on module_refcount
  2006-09-09 16:26 [PATCH -mm] scsi: compile error on module_refcount dwalker
@ 2006-09-09 16:31 ` Daniel Walker
  2006-09-09 16:48   ` James Bottomley
  0 siblings, 1 reply; 3+ messages in thread
From: Daniel Walker @ 2006-09-09 16:31 UTC (permalink / raw)
  To: akpm; +Cc: linux-kernel, James.Bottomley

On Sat, 2006-09-09 at 09:26 -0700, dwalker@mvista.com wrote:
> Fixes the following compile error,
> 
>   LD      .tmp_vmlinux1
> drivers/built-in.o(.text+0x8e1f9): In function `scsi_device_put':
> drivers/scsi/scsi.c:887: undefined reference to `module_refcount'
> make: *** [.tmp_vmlinux1] Error 1
> 
> There are only two users of module_refcount() outside of kernel/module.c
> and the other one uses ifdef's similar to this.
> 

of course,

Signed-Off-By: Daniel Walker <dwalker@mvista.com>


^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [PATCH -mm] scsi: compile error on module_refcount
  2006-09-09 16:31 ` Daniel Walker
@ 2006-09-09 16:48   ` James Bottomley
  0 siblings, 0 replies; 3+ messages in thread
From: James Bottomley @ 2006-09-09 16:48 UTC (permalink / raw)
  To: Daniel Walker; +Cc: akpm, linux-kernel

Thanks for the patch.

On Sat, 2006-09-09 at 09:31 -0700, Daniel Walker wrote
> Cc: linux-kernel@vger.kernel.org

for future reference, SCSI patches should go to
linux-scsi@vger.kernel.org, since most people who read and review them
don't actually subscribe to lkml.

James



^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2006-09-09 16:48 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2006-09-09 16:26 [PATCH -mm] scsi: compile error on module_refcount dwalker
2006-09-09 16:31 ` Daniel Walker
2006-09-09 16:48   ` James Bottomley

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®