Skip to content

Commit

Permalink
block: make /proc/diskstats only build if CONFIG_PROC_FS is enabled
Browse files Browse the repository at this point in the history
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: Randy Dunlap <[email protected]>
Signed-off-by: Greg Kroah-Hartman <[email protected]>
  • Loading branch information
rddunlap authored and gregkh committed Jul 22, 2008
1 parent a142be8 commit a6e2ba8
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions block/genhd.c
Original file line number Diff line number Diff line change
Expand Up @@ -544,6 +544,7 @@ static struct device_type disk_type = {
.release = disk_release,
};

#ifdef CONFIG_PROC_FS
/*
* aggregate disk stat collector. Uses the same stats that the sysfs
* entries do, above, but makes them available through one seq_file.
Expand Down Expand Up @@ -653,6 +654,7 @@ const struct seq_operations diskstats_op = {
.stop = diskstats_stop,
.show = diskstats_show
};
#endif /* CONFIG_PROC_FS */

static void media_change_notify_thread(struct work_struct *work)
{
Expand Down

0 comments on commit a6e2ba8

Please sign in to comment.