Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

Fix a build warning about leaking CONFIG_NFSD to userspace.

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>

authored by

Greg Banks and committed by
J. Bruce Fields
42d671c7 b5cbc369

+5 -4
+5 -4
include/linux/nfsd/stats.h
··· 11 11 12 12 #include <linux/nfs4.h> 13 13 14 + /* thread usage wraps very million seconds (approx one fortnight) */ 15 + #define NFSD_USAGE_WRAP (HZ*1000000) 16 + 17 + #ifdef __KERNEL__ 18 + 14 19 struct nfsd_stats { 15 20 unsigned int rchits; /* repcache hits */ 16 21 unsigned int rcmisses; /* repcache hits */ ··· 40 35 41 36 }; 42 37 43 - /* thread usage wraps very million seconds (approx one fortnight) */ 44 - #define NFSD_USAGE_WRAP (HZ*1000000) 45 - 46 - #ifdef __KERNEL__ 47 38 48 39 extern struct nfsd_stats nfsdstats; 49 40 extern struct svc_stat nfsd_svcstats;