aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorArnd Bergmann <arnd@arndb.de>2018-01-22 16:09:12 -0500
committerJ. Bruce Fields <bfields@redhat.com>2018-02-08 13:40:17 -0500
commit2285ae760de2cbe4b91a55c0a8033ec332fb8049 (patch)
tree258bb6f9e3be69e9bea33af4c08094f7fddba0f3
parent39ca1bf624b6b82cc895b0217889eaaf572a7913 (diff)
NFSD: hide unused svcxdr_dupstr()
There is now only one caller left for svcxdr_dupstr() and this is inside of an #ifdef, so we can get a warning when the option is disabled: fs/nfsd/nfs4xdr.c:241:1: error: 'svcxdr_dupstr' defined but not used [-Werror=unused-function] This changes the remaining caller to use a nicer IS_ENABLED() check, which lets the compiler drop the unused code silently. Fixes: e40d99e6183e ("NFSD: Clean up symlink argument XDR decoders") Suggested-by: Rasmus Villemoes <rasmus.villemoes@prevas.dk> Signed-off-by: Arnd Bergmann <arnd@arndb.de> Signed-off-by: J. Bruce Fields <bfields@redhat.com>
-rw-r--r--fs/nfsd/nfs4xdr.c5
1 files changed, 2 insertions, 3 deletions
diff --git a/fs/nfsd/nfs4xdr.c b/fs/nfsd/nfs4xdr.c
index e4395abd0f2b..e502fd16246b 100644
--- a/fs/nfsd/nfs4xdr.c
+++ b/fs/nfsd/nfs4xdr.c
@@ -455,8 +455,8 @@ nfsd4_decode_fattr(struct nfsd4_compoundargs *argp, u32 *bmval,
455 } 455 }
456 456
457 label->len = 0; 457 label->len = 0;
458#ifdef CONFIG_NFSD_V4_SECURITY_LABEL 458 if (IS_ENABLED(CONFIG_NFSD_V4_SECURITY_LABEL) &&
459 if (bmval[2] & FATTR4_WORD2_SECURITY_LABEL) { 459 bmval[2] & FATTR4_WORD2_SECURITY_LABEL) {
460 READ_BUF(4); 460 READ_BUF(4);
461 len += 4; 461 len += 4;
462 dummy32 = be32_to_cpup(p++); /* lfs: we don't use it */ 462 dummy32 = be32_to_cpup(p++); /* lfs: we don't use it */
@@ -476,7 +476,6 @@ nfsd4_decode_fattr(struct nfsd4_compoundargs *argp, u32 *bmval,
476 if (!label->data) 476 if (!label->data)
477 return nfserr_jukebox; 477 return nfserr_jukebox;
478 } 478 }
479#endif
480 if (bmval[2] & FATTR4_WORD2_MODE_UMASK) { 479 if (bmval[2] & FATTR4_WORD2_MODE_UMASK) {
481 if (!umask) 480 if (!umask)
482 goto xdr_error; 481 goto xdr_error;