* [PATCH] lib: find_last_bit.o needed by a module only, move it from lib to obj
@ 2009-04-23 13:40 Benny Halevy
2009-04-26 12:35 ` Rusty Russell
0 siblings, 1 reply; 4+ messages in thread
From: Benny Halevy @ 2009-04-23 13:40 UTC (permalink / raw)
To: Linus Torvalds
Cc: linux-kernel, Fred Isaman, Rusty Russell, Trond Myklebust,
Benny Halevy
From: Fred Isaman <iisaman@citi.umich.edu>
Currently, although find_last_bit is EXPORTed, it is statically linked with
the lernel and is referenced only under CONFIG_SMP.
When CONFIG_SMP is undefined and find_last_bit is referenced only by modules,
linking fails with:
ERROR: "find_last_bit" [fs/nfs/nfs.ko] undefined!
Cc: Rusty Russell <rusty@rustcorp.com.au>
Cc: Trond Myklebust <Trond.Myklebust@netapp.com>
Signed-off-by: Fred Isaman <iisaman@citi.umich.edu>
Signed-off-by: Benny Halevy <bhalevy@panasas.com>
---
Linus, can you please merge this trivial patch upstream?
This breaks nfs-2.6/{nfsv41,linux-next} on uni-processors
configured with !CONFIG_SMP.
Thanks,
Benny
lib/Makefile | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/lib/Makefile b/lib/Makefile
index d6edd67..33a40e4 100644
--- a/lib/Makefile
+++ b/lib/Makefile
@@ -38,7 +38,7 @@ lib-$(CONFIG_RWSEM_GENERIC_SPINLOCK) += rwsem-spinlock.o
lib-$(CONFIG_RWSEM_XCHGADD_ALGORITHM) += rwsem.o
lib-$(CONFIG_GENERIC_FIND_FIRST_BIT) += find_next_bit.o
lib-$(CONFIG_GENERIC_FIND_NEXT_BIT) += find_next_bit.o
-lib-$(CONFIG_GENERIC_FIND_LAST_BIT) += find_last_bit.o
+obj-$(CONFIG_GENERIC_FIND_LAST_BIT) += find_last_bit.o
obj-$(CONFIG_GENERIC_HWEIGHT) += hweight.o
obj-$(CONFIG_LOCK_KERNEL) += kernel_lock.o
obj-$(CONFIG_DEBUG_PREEMPT) += smp_processor_id.o
--
1.6.2.1
^ permalink raw reply related [flat|nested] 4+ messages in thread
* Re: [PATCH] lib: find_last_bit.o needed by a module only, move it from lib to obj
2009-04-23 13:40 [PATCH] lib: find_last_bit.o needed by a module only, move it from lib to obj Benny Halevy
@ 2009-04-26 12:35 ` Rusty Russell
2009-04-26 13:14 ` Christoph Hellwig
0 siblings, 1 reply; 4+ messages in thread
From: Rusty Russell @ 2009-04-26 12:35 UTC (permalink / raw)
To: Benny Halevy; +Cc: Linus Torvalds, linux-kernel, Fred Isaman, Trond Myklebust
On Thu, 23 Apr 2009 11:10:32 pm Benny Halevy wrote:
> From: Fred Isaman <iisaman@citi.umich.edu>
>
> Currently, although find_last_bit is EXPORTed, it is statically linked with
> the lernel and is referenced only under CONFIG_SMP.
Acked-by: Rusty Russell <rusty@rustcorp.com.au>
We know that any EXPORT_SYMBOL in lib-y is dubious, at least, but we're
lazy (ISTR it would gut lib-y to exclude them all).
Thanks,
Rusty.
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH] lib: find_last_bit.o needed by a module only, move it from lib to obj
2009-04-26 12:35 ` Rusty Russell
@ 2009-04-26 13:14 ` Christoph Hellwig
2009-04-26 14:13 ` Benny Halevy
0 siblings, 1 reply; 4+ messages in thread
From: Christoph Hellwig @ 2009-04-26 13:14 UTC (permalink / raw)
To: Rusty Russell
Cc: Benny Halevy, Linus Torvalds, linux-kernel, Fred Isaman,
Trond Myklebust
On Sun, Apr 26, 2009 at 10:05:19PM +0930, Rusty Russell wrote:
> On Thu, 23 Apr 2009 11:10:32 pm Benny Halevy wrote:
> > From: Fred Isaman <iisaman@citi.umich.edu>
> >
> > Currently, although find_last_bit is EXPORTed, it is statically linked with
> > the lernel and is referenced only under CONFIG_SMP.
>
> Acked-by: Rusty Russell <rusty@rustcorp.com.au>
>
> We know that any EXPORT_SYMBOL in lib-y is dubious, at least, but we're
> lazy (ISTR it would gut lib-y to exclude them all).
The whole of lib-y is dangerous and we should just kill it..
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH] lib: find_last_bit.o needed by a module only, move it from lib to obj
2009-04-26 13:14 ` Christoph Hellwig
@ 2009-04-26 14:13 ` Benny Halevy
0 siblings, 0 replies; 4+ messages in thread
From: Benny Halevy @ 2009-04-26 14:13 UTC (permalink / raw)
To: Christoph Hellwig
Cc: Rusty Russell, Linus Torvalds, linux-kernel, Fred Isaman,
Trond Myklebust
On Apr. 26, 2009, 16:14 +0300, Christoph Hellwig <hch@infradead.org> wrote:
> On Sun, Apr 26, 2009 at 10:05:19PM +0930, Rusty Russell wrote:
>> On Thu, 23 Apr 2009 11:10:32 pm Benny Halevy wrote:
>>> From: Fred Isaman <iisaman@citi.umich.edu>
>>>
>>> Currently, although find_last_bit is EXPORTed, it is statically linked with
>>> the lernel and is referenced only under CONFIG_SMP.
>> Acked-by: Rusty Russell <rusty@rustcorp.com.au>
>>
>> We know that any EXPORT_SYMBOL in lib-y is dubious, at least, but we're
>> lazy (ISTR it would gut lib-y to exclude them all).
>
> The whole of lib-y is dangerous and we should just kill it..
>
Why isn't it a standalone module?
Benny
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2009-04-26 14:14 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2009-04-23 13:40 [PATCH] lib: find_last_bit.o needed by a module only, move it from lib to obj Benny Halevy
2009-04-26 12:35 ` Rusty Russell
2009-04-26 13:14 ` Christoph Hellwig
2009-04-26 14:13 ` Benny Halevy
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox