All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] Fix a build warning about leaking CONFIG_NFSD to userspace.
@ 2009-03-26 15:32 Greg Banks
  2009-03-27 23:48 ` J. Bruce Fields
  0 siblings, 1 reply; 2+ messages in thread
From: Greg Banks @ 2009-03-26 15:32 UTC (permalink / raw)
  To: J. Bruce Fields; +Cc: NFS list

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>
---

 include/linux/nfsd/stats.h |    9 +++++----
 1 file changed, 5 insertions(+), 4 deletions(-)

Index: bfields/include/linux/nfsd/stats.h
===================================================================
--- bfields.orig/include/linux/nfsd/stats.h
+++ bfields/include/linux/nfsd/stats.h
@@ -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 */
@@ -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;


-- 
Greg Banks, P.Engineer, SGI Australian Software Group.
the brightly coloured sporks of revolution.
I don't speak for SGI.


^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2009-03-27 23:48 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2009-03-26 15:32 [PATCH] Fix a build warning about leaking CONFIG_NFSD to userspace Greg Banks
2009-03-27 23:48 ` J. Bruce Fields

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.