lkml.org 
[lkml]   [2006]   [Sep]   [9]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
Subject[PATCH] [1/6] Reduce user-visible noise in <linux/nfs_fs.h>
From
Date
We don't need any of this crap included from the user-visible part of
nfs_fs.h -- remove it all.

In fact, we probably don't need anything but NFS_SUPER_MAGIC to be
defined; is there any need for anything else? And magic numbers should
probably move to <linux/magic.h> rather than being strewn across various
fs-specific include files which exist in userspace for solely that
purpose.

With this patch, 'make header_check' works again at least on PowerPC.

Signed-off-by: David Woodhouse <dwmw2@infradead.org>

diff --git a/include/linux/nfs_fs.h b/include/linux/nfs_fs.h
index 530b1e6..6c2066c 100644
--- a/include/linux/nfs_fs.h
+++ b/include/linux/nfs_fs.h
@@ -9,27 +9,6 @@
#ifndef _LINUX_NFS_FS_H
#define _LINUX_NFS_FS_H

-#include <linux/in.h>
-#include <linux/mm.h>
-#include <linux/pagemap.h>
-#include <linux/rwsem.h>
-#include <linux/wait.h>
-
-#include <linux/sunrpc/debug.h>
-#include <linux/sunrpc/auth.h>
-#include <linux/sunrpc/clnt.h>
-
-#include <linux/nfs.h>
-#include <linux/nfs2.h>
-#include <linux/nfs3.h>
-#include <linux/nfs4.h>
-#include <linux/nfs_xdr.h>
-
-#include <linux/nfs_fs_sb.h>
-
-#include <linux/rwsem.h>
-#include <linux/mempool.h>
-
/*
* Enable debugging support for nfs client.
* Requires RPC_DEBUG.
@@ -48,11 +27,6 @@ #define NFS_MAX_TCP_TIMEOUT (600*HZ)
#define NFS_SUPER_MAGIC 0x6969

/*
- * These are the default flags for swap requests
- */
-#define NFS_RPC_SWAPFLAGS (RPC_TASK_SWAPPER|RPC_TASK_ROOTCREDS)
-
-/*
* When flushing a cluster of dirty pages, there can be different
* strategies:
*/
@@ -65,6 +39,32 @@ #define FLUSH_INVALIDATE 64 /* Invalidat

#ifdef __KERNEL__

+#include <linux/in.h>
+#include <linux/mm.h>
+#include <linux/pagemap.h>
+#include <linux/rwsem.h>
+#include <linux/wait.h>
+
+#include <linux/sunrpc/debug.h>
+#include <linux/sunrpc/auth.h>
+#include <linux/sunrpc/clnt.h>
+
+#include <linux/nfs.h>
+#include <linux/nfs2.h>
+#include <linux/nfs3.h>
+#include <linux/nfs4.h>
+#include <linux/nfs_xdr.h>
+
+#include <linux/nfs_fs_sb.h>
+
+#include <linux/rwsem.h>
+#include <linux/mempool.h>
+
+/*
+ * These are the default flags for swap requests
+ */
+#define NFS_RPC_SWAPFLAGS (RPC_TASK_SWAPPER|RPC_TASK_ROOTCREDS)
+
/*
* NFSv3/v4 Access mode cache entry
*/

--
dwmw2

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/

\
 
 \ /
  Last update: 2006-09-09 13:25    [W:0.214 / U:0.136 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site