linux-next.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] blkio: Fix linux-next build failure after merge of block tree
@ 2010-04-15  5:36 Divyesh Shah
  2010-04-15  5:51 ` Gui Jianfeng
  2010-04-15  6:56 ` Jens Axboe
  0 siblings, 2 replies; 3+ messages in thread
From: Divyesh Shah @ 2010-04-15  5:36 UTC (permalink / raw)
  To: jens.axboe, sfr; +Cc: guijianfeng, vgoyal, linux-next, linux-kernel

After merging the block tree, 20100414's linux-next build (x86_64
allmodconfig) failed like this:

ERROR: "get_gendisk" [block/blk-cgroup.ko] undefined!
ERROR: "sched_clock" [block/blk-cgroup.ko] undefined!

This happens because the two symbols aren't exported and hence not available
when blk-cgroup code is built as a module. I've tried to stay consistent with
the use of EXPORT_SYMBOL or EXPORT_SYMBOL_GPL with the other symbols in the
respective files.

Signed-off-by: Divyesh Shah <dpshah@google.com>
---

 block/genhd.c        |    1 +
 kernel/sched_clock.c |    1 +
 2 files changed, 2 insertions(+), 0 deletions(-)

diff --git a/block/genhd.c b/block/genhd.c
index d13ba76..154b5f8 100644
--- a/block/genhd.c
+++ b/block/genhd.c
@@ -596,6 +596,7 @@ struct gendisk *get_gendisk(dev_t devt, int *partno)
 
 	return disk;
 }
+EXPORT_SYMBOL(get_gendisk);
 
 /**
  * bdget_disk - do bdget() by gendisk and partition number
diff --git a/kernel/sched_clock.c b/kernel/sched_clock.c
index 5b49613..906a0f7 100644
--- a/kernel/sched_clock.c
+++ b/kernel/sched_clock.c
@@ -41,6 +41,7 @@ unsigned long long __attribute__((weak)) sched_clock(void)
 	return (unsigned long long)(jiffies - INITIAL_JIFFIES)
 					* (NSEC_PER_SEC / HZ);
 }
+EXPORT_SYMBOL_GPL(sched_clock);
 
 static __read_mostly int sched_clock_running;
 

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

* Re: [PATCH] blkio: Fix linux-next build failure after merge of block tree
  2010-04-15  5:36 [PATCH] blkio: Fix linux-next build failure after merge of block tree Divyesh Shah
@ 2010-04-15  5:51 ` Gui Jianfeng
  2010-04-15  6:56 ` Jens Axboe
  1 sibling, 0 replies; 3+ messages in thread
From: Gui Jianfeng @ 2010-04-15  5:51 UTC (permalink / raw)
  To: Divyesh Shah; +Cc: jens.axboe, sfr, vgoyal, linux-next, linux-kernel

Divyesh Shah wrote:
> After merging the block tree, 20100414's linux-next build (x86_64
> allmodconfig) failed like this:
> 
> ERROR: "get_gendisk" [block/blk-cgroup.ko] undefined!
> ERROR: "sched_clock" [block/blk-cgroup.ko] undefined!
> 
> This happens because the two symbols aren't exported and hence not available
> when blk-cgroup code is built as a module. I've tried to stay consistent with
> the use of EXPORT_SYMBOL or EXPORT_SYMBOL_GPL with the other symbols in the
> respective files.
> 
> Signed-off-by: Divyesh Shah <dpshah@google.com>

I was just about to post a same patch. :)

Acked-by: Gui Jianfeng <guijianfeng@cn.fujitsu.cn>

> ---
> 
>  block/genhd.c        |    1 +
>  kernel/sched_clock.c |    1 +
>  2 files changed, 2 insertions(+), 0 deletions(-)
> 
> diff --git a/block/genhd.c b/block/genhd.c
> index d13ba76..154b5f8 100644
> --- a/block/genhd.c
> +++ b/block/genhd.c
> @@ -596,6 +596,7 @@ struct gendisk *get_gendisk(dev_t devt, int *partno)
>  
>  	return disk;
>  }
> +EXPORT_SYMBOL(get_gendisk);
>  
>  /**
>   * bdget_disk - do bdget() by gendisk and partition number
> diff --git a/kernel/sched_clock.c b/kernel/sched_clock.c
> index 5b49613..906a0f7 100644
> --- a/kernel/sched_clock.c
> +++ b/kernel/sched_clock.c
> @@ -41,6 +41,7 @@ unsigned long long __attribute__((weak)) sched_clock(void)
>  	return (unsigned long long)(jiffies - INITIAL_JIFFIES)
>  					* (NSEC_PER_SEC / HZ);
>  }
> +EXPORT_SYMBOL_GPL(sched_clock);
>  
>  static __read_mostly int sched_clock_running;
>  
> 
> 
> 
> 

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

* Re: [PATCH] blkio: Fix linux-next build failure after merge of block tree
  2010-04-15  5:36 [PATCH] blkio: Fix linux-next build failure after merge of block tree Divyesh Shah
  2010-04-15  5:51 ` Gui Jianfeng
@ 2010-04-15  6:56 ` Jens Axboe
  1 sibling, 0 replies; 3+ messages in thread
From: Jens Axboe @ 2010-04-15  6:56 UTC (permalink / raw)
  To: Divyesh Shah; +Cc: sfr, guijianfeng, vgoyal, linux-next, linux-kernel

On Wed, Apr 14 2010, Divyesh Shah wrote:
> After merging the block tree, 20100414's linux-next build (x86_64
> allmodconfig) failed like this:
> 
> ERROR: "get_gendisk" [block/blk-cgroup.ko] undefined!
> ERROR: "sched_clock" [block/blk-cgroup.ko] undefined!
> 
> This happens because the two symbols aren't exported and hence not available
> when blk-cgroup code is built as a module. I've tried to stay consistent with
> the use of EXPORT_SYMBOL or EXPORT_SYMBOL_GPL with the other symbols in the
> respective files.

Thanks, applied. I changed the subject to say 'fix for modular
blk-cgroup build', as that is a lot more descriptive than saying you
fixed linux-next build. It's more informative to note the actual
problem, not how it was discovered.

-- 
Jens Axboe

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

end of thread, other threads:[~2010-04-15  6:56 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2010-04-15  5:36 [PATCH] blkio: Fix linux-next build failure after merge of block tree Divyesh Shah
2010-04-15  5:51 ` Gui Jianfeng
2010-04-15  6:56 ` Jens Axboe

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).