Skip to content

Commit

Permalink
nfsd: eliminate NFSD_DEBUG
Browse files Browse the repository at this point in the history
Commit f895b25 ("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: [email protected]
Fixes: f895b25 "sunrpc: eliminate RPC_DEBUG"
Signed-off-by: Mark Salter <[email protected]>
Reviewed-by: Jeff Layton <[email protected]>
Signed-off-by: J. Bruce Fields <[email protected]>
  • Loading branch information
mosalter authored and J. Bruce Fields committed Apr 21, 2015
1 parent 6e4891d commit 135dd00
Show file tree
Hide file tree
Showing 4 changed files with 3 additions and 11 deletions.
2 changes: 1 addition & 1 deletion fs/lockd/svcsubs.c
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@
static struct hlist_head nlm_files[FILE_NRHASH];
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)
{
u32 *fhp = (u32*)f->data;
Expand Down
2 changes: 1 addition & 1 deletion fs/nfsd/nfs4state.c
Original file line number Diff line number Diff line change
Expand Up @@ -1139,7 +1139,7 @@ hash_sessionid(struct nfs4_sessionid *sessionid)
return sid->sequence % SESSION_HASH_SIZE;
}

#ifdef NFSD_DEBUG
#ifdef CONFIG_SUNRPC_DEBUG
static inline void
dump_sessionid(const char *fn, struct nfs4_sessionid *sessionid)
{
Expand Down
2 changes: 1 addition & 1 deletion fs/nfsd/nfsd.h
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@
#include "export.h"

#undef ifdebug
#ifdef NFSD_DEBUG
#ifdef CONFIG_SUNRPC_DEBUG
# define ifdebug(flag) if (nfsd_debug & NFSDDBG_##flag)
#else
# define ifdebug(flag) if (0)
Expand Down
8 changes: 0 additions & 8 deletions include/uapi/linux/nfsd/debug.h
Original file line number Diff line number Diff line change
Expand Up @@ -11,14 +11,6 @@

#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
*/
Expand Down

0 comments on commit 135dd00

Please sign in to comment.