Commit c2ef47b7 authored by Chuck Lever's avatar Chuck Lever Committed by Anna Schumaker

NFS: Clean up nfs4_init_callback()

nfs4_init_callback() is never invoked for NFS versions other than 4.
Signed-off-by: default avatarChuck Lever <chuck.lever@oracle.com>
Signed-off-by: default avatarAnna Schumaker <Anna.Schumaker@Netapp.com>
parent 6dd3436b
...@@ -241,16 +241,13 @@ void nfs4_free_client(struct nfs_client *clp) ...@@ -241,16 +241,13 @@ void nfs4_free_client(struct nfs_client *clp)
*/ */
static int nfs4_init_callback(struct nfs_client *clp) static int nfs4_init_callback(struct nfs_client *clp)
{ {
int error;
if (clp->rpc_ops->version == 4) {
struct rpc_xprt *xprt; struct rpc_xprt *xprt;
int error;
xprt = rcu_dereference_raw(clp->cl_rpcclient->cl_xprt); xprt = rcu_dereference_raw(clp->cl_rpcclient->cl_xprt);
if (nfs4_has_session(clp)) { if (nfs4_has_session(clp)) {
error = xprt_setup_backchannel(xprt, error = xprt_setup_backchannel(xprt, NFS41_BC_MIN_CALLBACKS);
NFS41_BC_MIN_CALLBACKS);
if (error < 0) if (error < 0)
return error; return error;
} }
...@@ -262,7 +259,7 @@ static int nfs4_init_callback(struct nfs_client *clp) ...@@ -262,7 +259,7 @@ static int nfs4_init_callback(struct nfs_client *clp)
return error; return error;
} }
__set_bit(NFS_CS_CALLBACK, &clp->cl_res_state); __set_bit(NFS_CS_CALLBACK, &clp->cl_res_state);
}
return 0; return 0;
} }
......
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