History

[PATCH] headers_check: reduce user-visible noise in <linux/nfs_fs.h>

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.

David Woodhouse committed 20 years ago

Commit 7f1cbe51 parent d5e064a1 file · +26 −26Browse files

Unified · Split

include/linux/nfs_fs.h+26−26
@@ -9,27 +9,6 @@ · 8 unmodified lines
99 #ifndef _LINUX_NFS_FS_H
1010 #define _LINUX_NFS_FS_H
1111
12−#include <linux/in.h>
13−#include <linux/mm.h>
14−#include <linux/pagemap.h>
15−#include <linux/rwsem.h>
16−#include <linux/wait.h>
17−
18−#include <linux/sunrpc/debug.h>
19−#include <linux/sunrpc/auth.h>
20−#include <linux/sunrpc/clnt.h>
21−
22−#include <linux/nfs.h>
23−#include <linux/nfs2.h>
24−#include <linux/nfs3.h>
25−#include <linux/nfs4.h>
26−#include <linux/nfs_xdr.h>
27−
28−#include <linux/nfs_fs_sb.h>
29−
30−#include <linux/rwsem.h>
31−#include <linux/mempool.h>
32−
3312 /*
3413 * Enable debugging support for nfs client.
3514 * Requires RPC_DEBUG.
@@ -47,11 +26,6 @@ · 11 unmodified lines
4726 */
4827 #define NFS_SUPER_MAGIC 0x6969
4928
50−/*
51− * These are the default flags for swap requests
52− */
53−#define NFS_RPC_SWAPFLAGS (RPC_TASK_SWAPPER|RPC_TASK_ROOTCREDS)
54−
5529 /*
5630 * When flushing a cluster of dirty pages, there can be different
5731 * strategies:
@@ -65,6 +39,32 @@ · 7 unmodified lines
6539
6640 #ifdef __KERNEL__
6741
42+#include <linux/in.h>
43+#include <linux/mm.h>
44+#include <linux/pagemap.h>
45+#include <linux/rwsem.h>
46+#include <linux/wait.h>
47+
48+#include <linux/sunrpc/debug.h>
49+#include <linux/sunrpc/auth.h>
50+#include <linux/sunrpc/clnt.h>
51+
52+#include <linux/nfs.h>
53+#include <linux/nfs2.h>
54+#include <linux/nfs3.h>
55+#include <linux/nfs4.h>
56+#include <linux/nfs_xdr.h>
57+
58+#include <linux/nfs_fs_sb.h>
59+
60+#include <linux/rwsem.h>
61+#include <linux/mempool.h>
62+
63+/*
64+ * These are the default flags for swap requests
65+ */
66+#define NFS_RPC_SWAPFLAGS (RPC_TASK_SWAPPER|RPC_TASK_ROOTCREDS)
67+
6868 /*
6969 * NFSv3/v4 Access mode cache entry
7070 */