summaryrefslogtreecommitdiffstats
path: root/include
diff options
context:
space:
mode:
authorTrond Myklebust <Trond.Myklebust@netapp.com>2012-03-18 14:07:42 -0400
committerTrond Myklebust <Trond.Myklebust@netapp.com>2012-03-20 13:08:26 -0400
commite27d359e9b7e446190362cd5c8fe281d02194896 (patch)
tree5dece1801337b32e9d4ecc03e487a95856b413fa /include
parent3b3be88d67cc17d0f0ab6edaf131516793fc947e (diff)
downloadlinux-e27d359e9b7e446190362cd5c8fe281d02194896.tar.gz
linux-e27d359e9b7e446190362cd5c8fe281d02194896.tar.bz2
linux-e27d359e9b7e446190362cd5c8fe281d02194896.zip
SUNRPC/NFS: Add Kbuild dependencies for NFS_DEBUG/RPC_DEBUG
This allows us to turn on/off the dprintk() debugging interfaces for those distributions that don't ship the 'rpcdebug' utility. It also allows us to add Kbuild dependencies. Specifically, we already know that dprintk() in general relies on CONFIG_SYSCTL. Now it turns out that the NFS dprintks depend on CONFIG_CRC32 after we added support for the filehandle hash. Reported-by: Paul Gortmaker <paul.gortmaker@windriver.com> Signed-off-by: Trond Myklebust <Trond.Myklebust@netapp.com>
Diffstat (limited to 'include')
-rw-r--r--include/linux/nfs_fs.h17
-rw-r--r--include/linux/sunrpc/debug.h2
2 files changed, 9 insertions, 10 deletions
diff --git a/include/linux/nfs_fs.h b/include/linux/nfs_fs.h
index 0a63ab2b5a76..8f27c2e36ddf 100644
--- a/include/linux/nfs_fs.h
+++ b/include/linux/nfs_fs.h
@@ -38,6 +38,13 @@
#ifdef __KERNEL__
+/*
+ * Enable dprintk() debugging support for nfs client.
+ */
+#ifdef CONFIG_NFS_DEBUG
+# define NFS_DEBUG
+#endif
+
#include <linux/in.h>
#include <linux/mm.h>
#include <linux/pagemap.h>
@@ -391,7 +398,7 @@ static inline void nfs_free_fhandle(const struct nfs_fh *fh)
kfree(fh);
}
-#ifdef RPC_DEBUG
+#ifdef NFS_DEBUG
extern u32 _nfs_display_fhandle_hash(const struct nfs_fh *fh);
static inline u32 nfs_display_fhandle_hash(const struct nfs_fh *fh)
{
@@ -650,14 +657,6 @@ nfs_fileid_to_ino_t(u64 fileid)
#ifdef __KERNEL__
-/*
- * Enable debugging support for nfs client.
- * Requires RPC_DEBUG.
- */
-#ifdef RPC_DEBUG
-# define NFS_DEBUG
-#endif
-
# undef ifdebug
# ifdef NFS_DEBUG
# define ifdebug(fac) if (unlikely(nfs_debug & NFSDBG_##fac))
diff --git a/include/linux/sunrpc/debug.h b/include/linux/sunrpc/debug.h
index 6cb2517bcf75..9448eb5e426c 100644
--- a/include/linux/sunrpc/debug.h
+++ b/include/linux/sunrpc/debug.h
@@ -31,7 +31,7 @@
/*
* Enable RPC debugging/profiling.
*/
-#ifdef CONFIG_SYSCTL
+#ifdef CONFIG_SUNRPC_DEBUG
#define RPC_DEBUG
#endif
#ifdef CONFIG_TRACEPOINTS