Skip to content

Commit

Permalink
Fix a build warning about leaking CONFIG_NFSD to userspace.
Browse files Browse the repository at this point in the history
Fix a build warning about leaking CONFIG_NFSD to userspace.

The nfsd_stats data structure does not need to be available to
userspace; no kernel interface uses it.  So move it inside #ifdef
__KERNEL__ and the warning goes away.

Signed-off-by: Greg Banks <gnb@sgi.com>
Signed-off-by: J. Bruce Fields <bfields@citi.umich.edu>
  • Loading branch information
Greg Banks authored and J. Bruce Fields committed Mar 27, 2009
1 parent b5cbc36 commit 42d671c
Showing 1 changed file with 5 additions and 4 deletions.
9 changes: 5 additions & 4 deletions include/linux/nfsd/stats.h
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,11 @@

#include <linux/nfs4.h>

/* thread usage wraps very million seconds (approx one fortnight) */
#define NFSD_USAGE_WRAP (HZ*1000000)

#ifdef __KERNEL__

struct nfsd_stats {
unsigned int rchits; /* repcache hits */
unsigned int rcmisses; /* repcache hits */
Expand All @@ -35,10 +40,6 @@ struct nfsd_stats {

};

/* thread usage wraps very million seconds (approx one fortnight) */
#define NFSD_USAGE_WRAP (HZ*1000000)

#ifdef __KERNEL__

extern struct nfsd_stats nfsdstats;
extern struct svc_stat nfsd_svcstats;
Expand Down

0 comments on commit 42d671c

Please sign in to comment.