Commit 0ad30ff6 authored by Vasily Averin's avatar Vasily Averin Committed by J. Bruce Fields

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: a289ce53 (sunrpc: replace svc_serv->sv_bc_xprt by boolean flag)
Reported-by: default avatarkbuild test robot <lkp@intel.com>
Signed-off-by: default avatarVasily Averin <vvs@virtuozzo.com>
Signed-off-by: default avatarJ. Bruce Fields <bfields@redhat.com>
parent 91bd2ffa
......@@ -210,7 +210,7 @@ static int nfs_callback_up_net(int minorversion, struct svc_serv *serv,
if (!IS_ENABLED(CONFIG_NFS_V4_1) || minorversion == 0)
ret = nfs4_callback_up_net(serv, net);
else if (xprt->ops->bc_setup)
serv->sv_bc_enabled = true;
set_bc_enabled(serv);
else
ret = -EPROTONOSUPPORT;
......
......@@ -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)
{
}
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment