Commit 135dd002 authored by Mark Salter's avatar Mark Salter Committed by J. Bruce Fields

nfsd: eliminate NFSD_DEBUG

Commit f895b252 ("sunrpc: eliminate RPC_DEBUG") introduced
use of IS_ENABLED() in a uapi header which leads to a build
failure for userspace apps trying to use <linux/nfsd/debug.h>:

   linux/nfsd/debug.h:18:15: error: missing binary operator before token "("
  #if IS_ENABLED(CONFIG_SUNRPC_DEBUG)
                ^

Since this was only used to define NFSD_DEBUG if CONFIG_SUNRPC_DEBUG
is enabled, replace instances of NFSD_DEBUG with CONFIG_SUNRPC_DEBUG.

Cc: stable@vger.kernel.org
Fixes: f895b252 "sunrpc: eliminate RPC_DEBUG"
Signed-off-by: default avatarMark Salter <msalter@redhat.com>
Reviewed-by: default avatarJeff Layton <jlayton@primarydata.com>
Signed-off-by: default avatarJ. Bruce Fields <bfields@redhat.com>
parent 6e4891dc
...@@ -31,7 +31,7 @@ ...@@ -31,7 +31,7 @@
static struct hlist_head nlm_files[FILE_NRHASH]; static struct hlist_head nlm_files[FILE_NRHASH];
static DEFINE_MUTEX(nlm_file_mutex); static DEFINE_MUTEX(nlm_file_mutex);
#ifdef NFSD_DEBUG #ifdef CONFIG_SUNRPC_DEBUG
static inline void nlm_debug_print_fh(char *msg, struct nfs_fh *f) static inline void nlm_debug_print_fh(char *msg, struct nfs_fh *f)
{ {
u32 *fhp = (u32*)f->data; u32 *fhp = (u32*)f->data;
......
...@@ -1139,7 +1139,7 @@ hash_sessionid(struct nfs4_sessionid *sessionid) ...@@ -1139,7 +1139,7 @@ hash_sessionid(struct nfs4_sessionid *sessionid)
return sid->sequence % SESSION_HASH_SIZE; return sid->sequence % SESSION_HASH_SIZE;
} }
#ifdef NFSD_DEBUG #ifdef CONFIG_SUNRPC_DEBUG
static inline void static inline void
dump_sessionid(const char *fn, struct nfs4_sessionid *sessionid) dump_sessionid(const char *fn, struct nfs4_sessionid *sessionid)
{ {
......
...@@ -24,7 +24,7 @@ ...@@ -24,7 +24,7 @@
#include "export.h" #include "export.h"
#undef ifdebug #undef ifdebug
#ifdef NFSD_DEBUG #ifdef CONFIG_SUNRPC_DEBUG
# define ifdebug(flag) if (nfsd_debug & NFSDDBG_##flag) # define ifdebug(flag) if (nfsd_debug & NFSDDBG_##flag)
#else #else
# define ifdebug(flag) if (0) # define ifdebug(flag) if (0)
......
...@@ -11,14 +11,6 @@ ...@@ -11,14 +11,6 @@
#include <linux/sunrpc/debug.h> #include <linux/sunrpc/debug.h>
/*
* Enable debugging for nfsd.
* Requires RPC_DEBUG.
*/
#if IS_ENABLED(CONFIG_SUNRPC_DEBUG)
# define NFSD_DEBUG 1
#endif
/* /*
* knfsd debug flags * knfsd debug flags
*/ */
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment