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.
Unified · Split
| @@ -9,27 +9,6 @@ · 8 unmodified lines | ||
| 9 | 9 | #ifndef _LINUX_NFS_FS_H |
| 10 | 10 | #define _LINUX_NFS_FS_H |
| 11 | 11 | |
| 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 | − | |
| 33 | 12 | /* |
| 34 | 13 | * Enable debugging support for nfs client. |
| 35 | 14 | * Requires RPC_DEBUG. |
| @@ -47,11 +26,6 @@ · 11 unmodified lines | ||
| 47 | 26 | */ |
| 48 | 27 | #define NFS_SUPER_MAGIC 0x6969 |
| 49 | 28 | |
| 50 | −/* | |
| 51 | − * These are the default flags for swap requests | |
| 52 | − */ | |
| 53 | −#define NFS_RPC_SWAPFLAGS (RPC_TASK_SWAPPER|RPC_TASK_ROOTCREDS) | |
| 54 | − | |
| 55 | 29 | /* |
| 56 | 30 | * When flushing a cluster of dirty pages, there can be different |
| 57 | 31 | * strategies: |
| @@ -65,6 +39,32 @@ · 7 unmodified lines | ||
| 65 | 39 | |
| 66 | 40 | #ifdef __KERNEL__ |
| 67 | 41 | |
| 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 | + | |
| 68 | 68 | /* |
| 69 | 69 | * NFSv3/v4 Access mode cache entry |
| 70 | 70 | */ |