Skip to content

Commit

Permalink
blkio: fix for modular blk-cgroup build
Browse files Browse the repository at this point in the history
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>
Acked-by: Gui Jianfeng <guijianfeng@cn.fujitsu.cn>
Signed-off-by: Jens Axboe <jens.axboe@oracle.com>
  • Loading branch information
Divyesh Shah authored and Jens Axboe committed Apr 15, 2010
1 parent c0d97e9 commit b6ac23a
Showing 2 changed files with 2 additions and 0 deletions.
1 change: 1 addition & 0 deletions block/genhd.c
Original file line number Diff line number Diff line change
@@ -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
1 change: 1 addition & 0 deletions kernel/sched_clock.c
Original file line number Diff line number Diff line change
@@ -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;

0 comments on commit b6ac23a

Please sign in to comment.