From: Dai Ngo <dai.ngo@oracle.com>
To: trondmy@hammerspace.com
Cc: olga.kornievskaia@gmail.com, linux-nfs@vger.kernel.org
Subject: [PATCH 1/1] NFSv4.2: Remove ifdef CONFIG_NFSD_V4 from nfsV4.2 client SSC code.
Date: Tue, 20 Apr 2021 13:10:26 -0400 [thread overview]
Message-ID: <20210420171026.103588-1-dai.ngo@oracle.com> (raw)
The client SSC code should not depend on any of the CONFIG_NFSD config.
Replaced CONFIG_NFSD_V4 with CONFIG_NFS_V4_2_SSC_HELPER in nfs4file.c
and super.c. This patch also fixes the compiler warning of unused
variables when NFS_V4_2 is configured and NFSD_V4 is not.
Signed-off-by: Dai Ngo <dai.ngo@oracle.com>
---
fs/nfs/nfs4file.c | 6 ++++--
fs/nfs/super.c | 6 +++---
2 files changed, 7 insertions(+), 5 deletions(-)
diff --git a/fs/nfs/nfs4file.c b/fs/nfs/nfs4file.c
index 441a2fa073c8..042668f06adc 100644
--- a/fs/nfs/nfs4file.c
+++ b/fs/nfs/nfs4file.c
@@ -313,6 +313,7 @@ static loff_t nfs42_remap_file_range(struct file *src_file, loff_t src_off,
return ret < 0 ? ret : count;
}
+#ifdef CONFIG_NFS_V4_2_SSC_HELPER
static int read_name_gen = 1;
#define SSC_READ_NAME_BODY "ssc_read_%d"
@@ -411,6 +412,7 @@ static const struct nfs4_ssc_client_ops nfs4_ssc_clnt_ops_tbl = {
.sco_open = __nfs42_ssc_open,
.sco_close = __nfs42_ssc_close,
};
+#endif /* CONFIG_NFS_V4_2_SSC_HELPER */
/**
* nfs42_ssc_register_ops - Wrapper to register NFS_V4 ops in nfs_common
@@ -420,7 +422,7 @@ static const struct nfs4_ssc_client_ops nfs4_ssc_clnt_ops_tbl = {
*/
void nfs42_ssc_register_ops(void)
{
-#ifdef CONFIG_NFSD_V4
+#ifdef CONFIG_NFS_V4_2_SSC_HELPER
nfs42_ssc_register(&nfs4_ssc_clnt_ops_tbl);
#endif
}
@@ -433,7 +435,7 @@ void nfs42_ssc_register_ops(void)
*/
void nfs42_ssc_unregister_ops(void)
{
-#ifdef CONFIG_NFSD_V4
+#ifdef CONFIG_NFS_V4_2_SSC_HELPER
nfs42_ssc_unregister(&nfs4_ssc_clnt_ops_tbl);
#endif
}
diff --git a/fs/nfs/super.c b/fs/nfs/super.c
index 94885c6f8f54..df17e0ddbc4d 100644
--- a/fs/nfs/super.c
+++ b/fs/nfs/super.c
@@ -86,7 +86,7 @@ const struct super_operations nfs_sops = {
};
EXPORT_SYMBOL_GPL(nfs_sops);
-#ifdef CONFIG_NFS_V4_2
+#ifdef CONFIG_NFS_V4_2_SSC_HELPER
static const struct nfs_ssc_client_ops nfs_ssc_clnt_ops_tbl = {
.sco_sb_deactive = nfs_sb_deactive,
};
@@ -116,14 +116,14 @@ static void unregister_nfs4_fs(void)
#ifdef CONFIG_NFS_V4_2
static void nfs_ssc_register_ops(void)
{
-#ifdef CONFIG_NFSD_V4
+#ifdef CONFIG_NFS_V4_2_SSC_HELPER
nfs_ssc_register(&nfs_ssc_clnt_ops_tbl);
#endif
}
static void nfs_ssc_unregister_ops(void)
{
-#ifdef CONFIG_NFSD_V4
+#ifdef CONFIG_NFS_V4_2_SSC_HELPER
nfs_ssc_unregister(&nfs_ssc_clnt_ops_tbl);
#endif
}
--
2.9.5
next reply other threads:[~2021-04-20 17:27 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-04-20 17:10 Dai Ngo [this message]
2021-04-20 20:35 ` [PATCH 1/1] NFSv4.2: Remove ifdef CONFIG_NFSD_V4 from nfsV4.2 client SSC code Trond Myklebust
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=20210420171026.103588-1-dai.ngo@oracle.com \
--to=dai.ngo@oracle.com \
--cc=linux-nfs@vger.kernel.org \
--cc=olga.kornievskaia@gmail.com \
--cc=trondmy@hammerspace.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).