提交 a6e2ba88 编写于 作者: R Randy Dunlap 提交者: Greg Kroah-Hartman

block: make /proc/diskstats only build if CONFIG_PROC_FS is enabled

These functions are only needed if CONFIG_PROC_FS is enabled, so save
the space when it is not.

This also makes it easier for a patch later in this series to work
properly if CONFIG_PROC_FS is not enabled.
Signed-off-by: NRandy Dunlap <randy.dunlap@oracle.com>
Signed-off-by: NGreg Kroah-Hartman <gregkh@suse.de>
上级 a142be85
...@@ -544,6 +544,7 @@ static struct device_type disk_type = { ...@@ -544,6 +544,7 @@ static struct device_type disk_type = {
.release = disk_release, .release = disk_release,
}; };
#ifdef CONFIG_PROC_FS
/* /*
* aggregate disk stat collector. Uses the same stats that the sysfs * aggregate disk stat collector. Uses the same stats that the sysfs
* entries do, above, but makes them available through one seq_file. * entries do, above, but makes them available through one seq_file.
...@@ -653,6 +654,7 @@ const struct seq_operations diskstats_op = { ...@@ -653,6 +654,7 @@ const struct seq_operations diskstats_op = {
.stop = diskstats_stop, .stop = diskstats_stop,
.show = diskstats_show .show = diskstats_show
}; };
#endif /* CONFIG_PROC_FS */
static void media_change_notify_thread(struct work_struct *work) static void media_change_notify_thread(struct work_struct *work)
{ {
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册