Commit 2c185ffa authored by Peng Tao's avatar Peng Tao Committed by Greg Kroah-Hartman
Browse files

staging/lustre: don't compile procfs code when CONFIG_PROC_FS is off



The patch changes to conditionally compile procfs related source files.
This includes lproc_fid.c, lproc_fld.c, lproc_lov.c, lvfs_lib.c, lproc_mdc.c,
lproc_mgc.c, lprocfs_status.c, lproc_osc.c and sec_lproc.c.

There is a checkpatch warning about usage of simple_strtoul() in the patch.
But it needs to be fixed in a separate patch because it is not related to
CONFIG_PROC_FS breakage here.

Signed-off-by: default avatarPeng Tao <bergwolf@gmail.com>
Signed-off-by: default avatarAndreas Dilger <andreas.dilger@intel.com>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent 9d2834dd
Loading
Loading
Loading
Loading
+2 −1
Original line number Diff line number Diff line
obj-$(CONFIG_LUSTRE_FS) += fid.o
fid-y := fid_request.o lproc_fid.o fid_lib.o
fid-y := fid_request.o fid_lib.o
fid-$(CONFIG_PROC_FS) += lproc_fid.o


ccflags-y := -I$(src)/../include
+0 −2
Original line number Diff line number Diff line
@@ -54,7 +54,6 @@
#include <lustre_fid.h>
#include "fid_internal.h"

#ifdef LPROCFS
/*
 * Note: this function is only used for testing, it is no safe for production
 * use.
@@ -209,4 +208,3 @@ struct lprocfs_vars seq_client_proc_list[] = {
	{ "fid", &lprocfs_fid_fid_fops },
	{ NULL }
};
#endif
+2 −1
Original line number Diff line number Diff line
obj-$(CONFIG_LUSTRE_FS) += fld.o
fld-y := fld_request.o fld_cache.o lproc_fld.o
fld-y := fld_request.o fld_cache.o
fld-$(CONFIG_PROC_FS) += lproc_fld.o


ccflags-y := -I$(src)/../include
+0 −3
Original line number Diff line number Diff line
@@ -56,7 +56,6 @@
#include <lustre_fid.h>
#include "fld_internal.h"

#ifdef LPROCFS
static int
fld_proc_targets_seq_show(struct seq_file *m, void *unused)
{
@@ -162,5 +161,3 @@ struct lprocfs_vars fld_client_proc_list[] = {
	{ "hash", &fld_proc_hash_fops },
	{ "cache_flush", &fld_proc_cache_flush_fops },
	{ NULL }};

#endif /* LPROCFS */
+4 −4
Original line number Diff line number Diff line
@@ -370,6 +370,10 @@ static inline void s2dhms(struct dhms *ts, time_t secs)
#define JOBSTATS_DISABLE		"disable"
#define JOBSTATS_PROCNAME_UID		"procname_uid"

extern int lprocfs_write_frac_helper(const char *buffer, unsigned long count,
				     int *val, int mult);
extern int lprocfs_read_frac_helper(char *buffer, unsigned long count,
				    long val, int mult);
#ifdef LPROCFS

extern int lprocfs_stats_alloc_one(struct lprocfs_stats *stats,
@@ -641,11 +645,7 @@ extern int lprocfs_rd_filesfree(struct seq_file *m, void *data);

extern int lprocfs_write_helper(const char *buffer, unsigned long count,
				int *val);
extern int lprocfs_write_frac_helper(const char *buffer, unsigned long count,
				     int *val, int mult);
extern int lprocfs_seq_read_frac_helper(struct seq_file *m, long val, int mult);
extern int lprocfs_read_frac_helper(char *buffer, unsigned long count,
				    long val, int mult);
extern int lprocfs_write_u64_helper(const char *buffer, unsigned long count,
				    __u64 *val);
extern int lprocfs_write_frac_u64_helper(const char *buffer,
Loading