summaryrefslogtreecommitdiff
path: root/include/linux/sunrpc
diff options
context:
space:
mode:
authorVasily Averin <vvs@virtuozzo.com>2018-12-29 16:38:51 +0300
committerJ. Bruce Fields <bfields@redhat.com>2018-12-31 11:25:16 -0500
commit0ad30ff67bd3e82da8c1dc4d74b88aca846dbbd9 (patch)
tree62cc84a0ce48136053b8e19050e0a3678d21a634 /include/linux/sunrpc
parent91bd2ffa9030191ad077e43be37c5bfc53640dc2 (diff)
nfs: fixed broken compilation in nfs_callback_up_net()
Patch fixes compilation error in nfs_callback_up_net() serv->sv_bc_enabled is defined under enabled CONFIG_SUNRPC_BACKCHANNEL, however nfs_callback_up_net() can access it even if this config option was not set. Fixes: a289ce5311f4 (sunrpc: replace svc_serv->sv_bc_xprt by boolean flag) Reported-by: kbuild test robot <lkp@intel.com> Signed-off-by: Vasily Averin <vvs@virtuozzo.com> Signed-off-by: J. Bruce Fields <bfields@redhat.com>
Diffstat (limited to 'include/linux/sunrpc')
-rw-r--r--include/linux/sunrpc/bc_xprt.h9
1 files changed, 9 insertions, 0 deletions
diff --git a/include/linux/sunrpc/bc_xprt.h b/include/linux/sunrpc/bc_xprt.h
index 4e8c773d02be..d4229a78524a 100644
--- a/include/linux/sunrpc/bc_xprt.h
+++ b/include/linux/sunrpc/bc_xprt.h
@@ -51,6 +51,11 @@ static inline bool svc_is_backchannel(const struct svc_rqst *rqstp)
{
return rqstp->rq_server->sv_bc_enabled;
}
+
+static inline void set_bc_enabled(struct svc_serv *serv)
+{
+ serv->sv_bc_enabled = true;
+}
#else /* CONFIG_SUNRPC_BACKCHANNEL */
static inline int xprt_setup_backchannel(struct rpc_xprt *xprt,
unsigned int min_reqs)
@@ -63,6 +68,10 @@ static inline bool svc_is_backchannel(const struct svc_rqst *rqstp)
return false;
}
+static inline void set_bc_enabled(struct svc_serv *serv)
+{
+}
+
static inline void xprt_free_bc_request(struct rpc_rqst *req)
{
}