All of lore.kernel.org
 help / color / mirror / Atom feed
From: Arnd Bergmann <arnd@arndb.de>
To: "J. Bruce Fields" <bfields@fieldses.org>,
	Jeff Layton <jlayton@kernel.org>
Cc: Arnd Bergmann <arnd@arndb.de>,
	Chuck Lever <chuck.lever@oracle.com>,
	Trond Myklebust <trond.myklebust@primarydata.com>,
	Kinglong Mee <kinglongmee@gmail.com>,
	linux-nfs@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: [PATCH] NFSD: hide unused svcxdr_dupstr()
Date: Fri, 19 Jan 2018 15:54:03 +0100	[thread overview]
Message-ID: <20180119145410.1096453-1-arnd@arndb.de> (raw)

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 adds another #ifdef around the definition.

Fixes: e40d99e6183e ("NFSD: Clean up symlink argument XDR decoders")
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
---
 fs/nfsd/nfs4xdr.c | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/fs/nfsd/nfs4xdr.c b/fs/nfsd/nfs4xdr.c
index f51c9cccaf78..374a62af6034 100644
--- a/fs/nfsd/nfs4xdr.c
+++ b/fs/nfsd/nfs4xdr.c
@@ -237,6 +237,7 @@ svcxdr_tmpalloc(struct nfsd4_compoundargs *argp, u32 len)
  * Note null-terminating in place usually isn't safe since the
  * buffer might end on a page boundary.
  */
+#ifdef CONFIG_NFSD_V4_SECURITY_LABEL
 static char *
 svcxdr_dupstr(struct nfsd4_compoundargs *argp, void *buf, u32 len)
 {
@@ -248,6 +249,7 @@ svcxdr_dupstr(struct nfsd4_compoundargs *argp, void *buf, u32 len)
 	p[len] = '\0';
 	return p;
 }
+#endif
 
 /**
  * savemem - duplicate a chunk of memory for later processing
-- 
2.9.0

             reply	other threads:[~2018-01-19 14:54 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-01-19 14:54 Arnd Bergmann [this message]
2018-01-19 16:15 ` [PATCH] NFSD: hide unused svcxdr_dupstr() Chuck Lever
2018-01-19 16:15   ` Chuck Lever
2018-01-19 16:27   ` Bruce Fields
2018-01-19 21:58 ` Rasmus Villemoes
2018-01-22 17:26   ` J. Bruce Fields

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20180119145410.1096453-1-arnd@arndb.de \
    --to=arnd@arndb.de \
    --cc=bfields@fieldses.org \
    --cc=chuck.lever@oracle.com \
    --cc=jlayton@kernel.org \
    --cc=kinglongmee@gmail.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-nfs@vger.kernel.org \
    --cc=trond.myklebust@primarydata.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.