aboutsummaryrefslogtreecommitdiffstats
path: root/fs/nfs/nfs4client.c
diff options
context:
space:
mode:
authorChuck Lever <chuck.lever@oracle.com>2014-11-08 20:15:26 -0500
committerAnna Schumaker <Anna.Schumaker@Netapp.com>2014-11-25 16:22:16 -0500
commitc2ef47b7f518f5eae5ffed11b8ac754fb263d398 (patch)
treec6dd8d83065c96b5650018da1bd3f60e3afcacb6 /fs/nfs/nfs4client.c
parent6dd3436b9dc0df4b9ae7bb4e0076996a5ffda219 (diff)
NFS: Clean up nfs4_init_callback()
nfs4_init_callback() is never invoked for NFS versions other than 4. Signed-off-by: Chuck Lever <chuck.lever@oracle.com> Signed-off-by: Anna Schumaker <Anna.Schumaker@Netapp.com>
Diffstat (limited to 'fs/nfs/nfs4client.c')
-rw-r--r--fs/nfs/nfs4client.c31
1 files changed, 14 insertions, 17 deletions
diff --git a/fs/nfs/nfs4client.c b/fs/nfs/nfs4client.c
index ffdb28d86cf8..5f4b818182f9 100644
--- a/fs/nfs/nfs4client.c
+++ b/fs/nfs/nfs4client.c
@@ -241,28 +241,25 @@ void nfs4_free_client(struct nfs_client *clp)
241 */ 241 */
242static int nfs4_init_callback(struct nfs_client *clp) 242static int nfs4_init_callback(struct nfs_client *clp)
243{ 243{
244 struct rpc_xprt *xprt;
244 int error; 245 int error;
245 246
246 if (clp->rpc_ops->version == 4) { 247 xprt = rcu_dereference_raw(clp->cl_rpcclient->cl_xprt);
247 struct rpc_xprt *xprt;
248 248
249 xprt = rcu_dereference_raw(clp->cl_rpcclient->cl_xprt); 249 if (nfs4_has_session(clp)) {
250 250 error = xprt_setup_backchannel(xprt, NFS41_BC_MIN_CALLBACKS);
251 if (nfs4_has_session(clp)) { 251 if (error < 0)
252 error = xprt_setup_backchannel(xprt,
253 NFS41_BC_MIN_CALLBACKS);
254 if (error < 0)
255 return error;
256 }
257
258 error = nfs_callback_up(clp->cl_mvops->minor_version, xprt);
259 if (error < 0) {
260 dprintk("%s: failed to start callback. Error = %d\n",
261 __func__, error);
262 return error; 252 return error;
263 }
264 __set_bit(NFS_CS_CALLBACK, &clp->cl_res_state);
265 } 253 }
254
255 error = nfs_callback_up(clp->cl_mvops->minor_version, xprt);
256 if (error < 0) {
257 dprintk("%s: failed to start callback. Error = %d\n",
258 __func__, error);
259 return error;
260 }
261 __set_bit(NFS_CS_CALLBACK, &clp->cl_res_state);
262
266 return 0; 263 return 0;
267} 264}
268 265