diff options
author | Trond Myklebust <Trond.Myklebust@netapp.com> | 2012-03-20 15:11:17 -0400 |
---|---|---|
committer | J. Bruce Fields <bfields@redhat.com> | 2012-03-20 15:34:19 -0400 |
commit | 8f199b8262cb150d055d29ba31faf0128ace4714 (patch) | |
tree | 364e4fa206a5d45557d9ca30aaf3420007906db6 /fs/nfsd | |
parent | 62b9510cb373d5722fdaba71d961d8f695acfcd5 (diff) |
NFSD: Fix warnings when NFSD_DEBUG is not defined
Signed-off-by: Trond Myklebust <Trond.Myklebust@netapp.com>
Signed-off-by: J. Bruce Fields <bfields@redhat.com>
Diffstat (limited to 'fs/nfsd')
-rw-r--r-- | fs/nfsd/nfs4proc.c | 4 | ||||
-rw-r--r-- | fs/nfsd/nfs4state.c | 8 |
2 files changed, 12 insertions, 0 deletions
diff --git a/fs/nfsd/nfs4proc.c b/fs/nfsd/nfs4proc.c index abe808a52d97..3f7dbc410e3a 100644 --- a/fs/nfsd/nfs4proc.c +++ b/fs/nfsd/nfs4proc.c | |||
@@ -1053,7 +1053,9 @@ struct nfsd4_operation { | |||
1053 | 1053 | ||
1054 | static struct nfsd4_operation nfsd4_ops[]; | 1054 | static struct nfsd4_operation nfsd4_ops[]; |
1055 | 1055 | ||
1056 | #ifdef NFSD_DEBUG | ||
1056 | static const char *nfsd4_op_name(unsigned opnum); | 1057 | static const char *nfsd4_op_name(unsigned opnum); |
1058 | #endif | ||
1057 | 1059 | ||
1058 | /* | 1060 | /* |
1059 | * Enforce NFSv4.1 COMPOUND ordering rules: | 1061 | * Enforce NFSv4.1 COMPOUND ordering rules: |
@@ -1714,12 +1716,14 @@ static struct nfsd4_operation nfsd4_ops[] = { | |||
1714 | }, | 1716 | }, |
1715 | }; | 1717 | }; |
1716 | 1718 | ||
1719 | #ifdef NFSD_DEBUG | ||
1717 | static const char *nfsd4_op_name(unsigned opnum) | 1720 | static const char *nfsd4_op_name(unsigned opnum) |
1718 | { | 1721 | { |
1719 | if (opnum < ARRAY_SIZE(nfsd4_ops)) | 1722 | if (opnum < ARRAY_SIZE(nfsd4_ops)) |
1720 | return nfsd4_ops[opnum].op_name; | 1723 | return nfsd4_ops[opnum].op_name; |
1721 | return "unknown_operation"; | 1724 | return "unknown_operation"; |
1722 | } | 1725 | } |
1726 | #endif | ||
1723 | 1727 | ||
1724 | #define nfsd4_voidres nfsd4_voidargs | 1728 | #define nfsd4_voidres nfsd4_voidargs |
1725 | struct nfsd4_voidargs { int dummy; }; | 1729 | struct nfsd4_voidargs { int dummy; }; |
diff --git a/fs/nfsd/nfs4state.c b/fs/nfsd/nfs4state.c index 867086357f6c..cdc406a28eff 100644 --- a/fs/nfsd/nfs4state.c +++ b/fs/nfsd/nfs4state.c | |||
@@ -622,12 +622,20 @@ hash_sessionid(struct nfs4_sessionid *sessionid) | |||
622 | return sid->sequence % SESSION_HASH_SIZE; | 622 | return sid->sequence % SESSION_HASH_SIZE; |
623 | } | 623 | } |
624 | 624 | ||
625 | #ifdef NFSD_DEBUG | ||
625 | static inline void | 626 | static inline void |
626 | dump_sessionid(const char *fn, struct nfs4_sessionid *sessionid) | 627 | dump_sessionid(const char *fn, struct nfs4_sessionid *sessionid) |
627 | { | 628 | { |
628 | u32 *ptr = (u32 *)(&sessionid->data[0]); | 629 | u32 *ptr = (u32 *)(&sessionid->data[0]); |
629 | dprintk("%s: %u:%u:%u:%u\n", fn, ptr[0], ptr[1], ptr[2], ptr[3]); | 630 | dprintk("%s: %u:%u:%u:%u\n", fn, ptr[0], ptr[1], ptr[2], ptr[3]); |
630 | } | 631 | } |
632 | #else | ||
633 | static inline void | ||
634 | dump_sessionid(const char *fn, struct nfs4_sessionid *sessionid) | ||
635 | { | ||
636 | } | ||
637 | #endif | ||
638 | |||
631 | 639 | ||
632 | static void | 640 | static void |
633 | gen_sessionid(struct nfsd4_session *ses) | 641 | gen_sessionid(struct nfsd4_session *ses) |