Skip to contentSkip to conversation

get rid of include/linux/nfsd

PATCH New Christoph Hellwig 2 participants 6 messages May 6, 2014

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

Now that all user-visible headers are in include/uapi there is nothing left there which shouldn't rather be under fs/nfsd/.

#1 lore raw

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
index 00ec0b9..d3e40db 100644
@@ -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
index 9a55797..3e9f787 100644
@@ -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
index dc5c759..7ec6b10 100644
@@ -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
index 964666c..9340e7e 100644
@@ -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
index 479eb68..7d5c310 100644
@@ -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
index 424d8f5..5b3bbf2 100644
@@ -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
index dcaad79..219d796 100644
@@ -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
index 7898c99..b12c4e5 100644
@@ -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
#2 lore raw

PATCH 2/4 nfsd: move <linux/nfsd/export.h> to fs/nfsd

In reply to Christoph Hellwig

There 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
index 7ec6b10..b6f3b84 100644
@@ -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
index 7d5c310..72004ca 100644
@@ -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
#3 lore raw

PATCH 3/4 nfsd: move <linux/nfsd/stats.h> to fs/nfsd

In reply to Christoph Hellwig

There 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
index 72004ca..7a07f9c 100644
@@ -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
index 6d4521f..cd90878 100644
@@ -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
#4 lore raw

PATCH 4/4 nfsd: remove <linux/nfsd/debug.h>

In reply to Christoph Hellwig

There 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
index 7a07f9c..e9f2fd4 100644
@@ -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
deleted file mode 100644
index 19ef837..0000000
@@ -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
#5 lore raw
In reply to Christoph Hellwig
Quoted 2 lines · Christoph Hellwig

Now that all user-visible headers are in include/uapi there is nothing left there which shouldn't rather be under fs/nfsd/.

Makes sense, thanks, applying.

I'll try to get a for-3.16 branch pushed out today or tomorrow.

--b.