get rid of include/linux/nfsd
Subsystems (2)
Now that all user-visible headers are in include/uapi there is nothing left there which shouldn't rather be under fs/nfsd/.
PATCH 1/4 nfsd: remove <linux/nfsd/nfsfh.h>
The only real user of this header is fs/nfsd/nfsfh.h, so merge the two. Various lockѕ source files used it to indirectly get other sunrpc or nfs headers, so fix those up.
--- fs/lockd/clnt4xdr.c | 2 ++ fs/lockd/clntxdr.c | 2 ++ fs/lockd/svcsubs.c | 2 +- fs/lockd/xdr.c | 2 ++ fs/nfsd/nfsd.h | 1 + fs/nfsd/nfsfh.h | 59 ++++++++++++++++++++++++++++++++++++---- fs/nfsd/state.h | 1 - include/linux/lockd/lockd.h | 2 +- include/linux/nfsd/export.h | 6 ++++- include/linux/nfsd/nfsfh.h | 63 ------------------------------------------- 10 files changed, 68 insertions(+), 72 deletions(-) delete mode 100644 include/linux/nfsd/nfsfh.h
fs/lockd/clnt4xdr.c +2 -0
@@ -14,6 +14,8 @@#include <linux/sunrpc/stats.h> #include <linux/lockd/lockd.h> +#include <uapi/linux/nfs3.h> +#define NLMDBG_FACILITY NLMDBG_XDR#if (NLMCLNT_OHSIZE >XDR_MAX_NETOBJ )
fs/lockd/clntxdr.c +2 -0
@@ -15,6 +15,8 @@#include <linux/sunrpc/stats.h> #include <linux/lockd/lockd.h> +#include <uapi/linux/nfs2.h> +#define NLMDBG_FACILITY NLMDBG_XDR#if (NLMCLNT_OHSIZE >XDR_MAX_NETOBJ )
fs/lockd/svcsubs.c +1 -1
@@ -14,12 +14,12 @@#include <linux/mutex.h> #include <linux/sunrpc/svc.h> #include <linux/sunrpc/addr.h> -#include <linux/nfsd/nfsfh.h> #include <linux/nfsd/export.h> #include <linux/lockd/lockd.h> #include <linux/lockd/share.h> #include <linux/module.h> #include <linux/mount.h> +#include <uapi/linux/nfs2.h> #define NLMDBG_FACILITY NLMDBG_SVCSUBS
fs/lockd/xdr.c +2 -0
@@ -16,6 +16,8 @@#include <linux/sunrpc/stats.h> #include <linux/lockd/lockd.h> +#include <uapi/linux/nfs2.h> +#define NLMDBG_FACILITY NLMDBG_XDR
fs/nfsd/nfsd.h +1 -0
@@ -15,6 +15,7 @@#include <linux/nfs2.h> #include <linux/nfs3.h> #include <linux/nfs4.h> +#include <linux/sunrpc/svc.h> #include <linux/sunrpc/msg_prot.h> #include <linux/nfsd/debug.h>
fs/nfsd/nfsfh.h +54 -5
67 lines not on this page · raw message
fs/nfsd/state.h +0 -1
@@ -37,7 +37,6 @@#include <linux/idr.h> #include <linux/sunrpc/svc_xprt.h> -#include <linux/nfsd/nfsfh.h> #include "nfsfh.h" typedef struct {
include/linux/lockd/lockd.h +1 -1
@@ -17,13 +17,13 @@#include <linux/fs.h> #include <linux/kref.h> #include <linux/utsname.h> -#include <linux/nfsd/nfsfh.h> #include <linux/lockd/bind.h> #include <linux/lockd/xdr.h> #ifdef CONFIG_LOCKD_V4 #include <linux/lockd/xdr4.h> #endif #include <linux/lockd/debug.h> +#include <linux/sunrpc/svc.h> /* * Version string
include/linux/nfsd/export.h +5 -1
@@ -9,9 +9,13 @@#ifndef NFSD_EXPORT_H #define NFSD_EXPORT_H -# include <linux/nfsd/nfsfh.h> +#include <linux/sunrpc/cache.h> #include <uapi/linux/nfsd/export.h> +struct knfsd_fh ; +struct svc_fh ; +struct svc_rqst ; +/* * FS Locations */
include/linux/nfsd/nfsfh.h deleted +0 -63
63 lines not on this page · raw message
Signature · 1 line
1.7.10.4
PATCH 2/4 nfsd: move <linux/nfsd/export.h> to fs/nfsd
In reply to Christoph HellwigThere are no legitimate users outside of fs/nfsd, so move it there.
--- fs/lockd/svcsubs.c | 1 - fs/nfsd/export.h | 109 +++++++++++++++++++++++++++++++++++++++++ fs/nfsd/nfsd.h | 3 +- include/linux/nfsd/export.h | 114 ------------------------------------------- 4 files changed, 111 insertions(+), 116 deletions(-) create mode 100644 fs/nfsd/export.h delete mode 100644 include/linux/nfsd/export.h
fs/lockd/svcsubs.c +0 -1
@@ -14,7 +14,6 @@#include <linux/mutex.h> #include <linux/sunrpc/svc.h> #include <linux/sunrpc/addr.h> -#include <linux/nfsd/export.h> #include <linux/lockd/lockd.h> #include <linux/lockd/share.h> #include <linux/module.h>
fs/nfsd/export.h new file +109 -0
109 lines not on this page · raw message
fs/nfsd/nfsd.h +2 -1
@@ -19,9 +19,10 @@#include <linux/sunrpc/msg_prot.h> #include <linux/nfsd/debug.h> -#include <linux/nfsd/export.h> #include <linux/nfsd/stats.h> +#include "export.h" +/* * nfsd version */
include/linux/nfsd/export.h deleted +0 -114
114 lines not on this page · raw message
Signature · 1 line
1.7.10.4
PATCH 3/4 nfsd: move <linux/nfsd/stats.h> to fs/nfsd
In reply to Christoph HellwigThere are no legitimate users outside of fs/nfsd, so move it there.
--- fs/nfsd/nfsd.h | 2 +- fs/nfsd/stats.c | 1 - fs/nfsd/stats.h | 43 ++++++++++++++++++++++++++++++++++++++++++ include/linux/nfsd/stats.h | 45 -------------------------------------------- 4 files changed, 44 insertions(+), 47 deletions(-) create mode 100644 fs/nfsd/stats.h delete mode 100644 include/linux/nfsd/stats.h
fs/nfsd/nfsd.h +1 -1
@@ -19,8 +19,8 @@#include <linux/sunrpc/msg_prot.h> #include <linux/nfsd/debug.h> -#include <linux/nfsd/stats.h> +#include "stats.h" #include "export.h" /*
fs/nfsd/stats.c +0 -1
@@ -24,7 +24,6 @@#include <linux/seq_file.h> #include <linux/module.h> #include <linux/sunrpc/stats.h> -#include <linux/nfsd/stats.h> #include <net/net_namespace.h> #include "nfsd.h"
fs/nfsd/stats.h new file +43 -0
43 lines not on this page · raw message
include/linux/nfsd/stats.h deleted +0 -45
45 lines not on this page · raw message
Signature · 1 line
1.7.10.4
PATCH 4/4 nfsd: remove <linux/nfsd/debug.h>
In reply to Christoph HellwigThere is almost nothing left it in, just merge it into the only file that includes it.
--- fs/nfsd/nfsd.h | 9 ++++++++- include/linux/nfsd/debug.h | 19 ------------------- 2 files changed, 8 insertions(+), 20 deletions(-) delete mode 100644 include/linux/nfsd/debug.h
fs/nfsd/nfsd.h +8 -1
@@ -18,11 +18,18 @@#include <linux/sunrpc/svc.h> #include <linux/sunrpc/msg_prot.h> -#include <linux/nfsd/debug.h> +#include <uapi/linux/nfsd/debug.h> #include "stats.h" #include "export.h" +#undef ifdebug +#ifdef NFSD_DEBUG +# define ifdebug (flag) if (nfsd_debug & NFSDDBG_##flag) +#else +# define ifdebug (flag) if (0) +#endif +/* * nfsd version */
include/linux/nfsd/debug.h deleted +0 -19
@@ -1,19 +0,0 @@ -/* -* linux/include/linux/nfsd/debug.h -* -* Debugging-related stuff for nfsd -* -* Copyright (C) 1995 Olaf Kirch <[email protected]> -*/ -#ifndef LINUX_NFSD_DEBUG_H -#define LINUX_NFSD_DEBUG_H - -#include <uapi/linux/nfsd/debug.h> - -# undef ifdebug -# ifdef NFSD_DEBUG -# define ifdebug (flag) if (nfsd_debug & NFSDDBG_##flag) -# else -# define ifdebug (flag) if (0) -# endif -#endif /* LINUX_NFSD_DEBUG_H */
Signature · 1 line
1.7.10.4
Quoted 2 lines · Christoph Hellwig
Now that all user-visible headers are in
include/uapithere is nothing left there which shouldn't rather be underfs/nfsd/.
Makes sense, thanks, applying.
I'll try to get a for-3.16 branch pushed out today or tomorrow.
--b.