diff options
Diffstat (limited to 'fs/nfsd/nfs4callback.c')
-rw-r--r-- | fs/nfsd/nfs4callback.c | 11 |
1 files changed, 2 insertions, 9 deletions
diff --git a/fs/nfsd/nfs4callback.c b/fs/nfsd/nfs4callback.c index 3fd23f7aceca..81d1c5285dcc 100644 --- a/fs/nfsd/nfs4callback.c +++ b/fs/nfsd/nfs4callback.c | |||
@@ -377,7 +377,6 @@ static int max_cb_time(void) | |||
377 | 377 | ||
378 | int setup_callback_client(struct nfs4_client *clp) | 378 | int setup_callback_client(struct nfs4_client *clp) |
379 | { | 379 | { |
380 | struct sockaddr_in addr; | ||
381 | struct nfs4_cb_conn *cb = &clp->cl_cb_conn; | 380 | struct nfs4_cb_conn *cb = &clp->cl_cb_conn; |
382 | struct rpc_timeout timeparms = { | 381 | struct rpc_timeout timeparms = { |
383 | .to_initval = max_cb_time(), | 382 | .to_initval = max_cb_time(), |
@@ -385,8 +384,8 @@ int setup_callback_client(struct nfs4_client *clp) | |||
385 | }; | 384 | }; |
386 | struct rpc_create_args args = { | 385 | struct rpc_create_args args = { |
387 | .protocol = IPPROTO_TCP, | 386 | .protocol = IPPROTO_TCP, |
388 | .address = (struct sockaddr *)&addr, | 387 | .address = (struct sockaddr *) &cb->cb_addr, |
389 | .addrsize = sizeof(addr), | 388 | .addrsize = cb->cb_addrlen, |
390 | .timeout = &timeparms, | 389 | .timeout = &timeparms, |
391 | .program = &cb_program, | 390 | .program = &cb_program, |
392 | .prognumber = cb->cb_prog, | 391 | .prognumber = cb->cb_prog, |
@@ -400,12 +399,6 @@ int setup_callback_client(struct nfs4_client *clp) | |||
400 | if (!clp->cl_principal && (clp->cl_flavor >= RPC_AUTH_GSS_KRB5)) | 399 | if (!clp->cl_principal && (clp->cl_flavor >= RPC_AUTH_GSS_KRB5)) |
401 | return -EINVAL; | 400 | return -EINVAL; |
402 | 401 | ||
403 | /* Initialize address */ | ||
404 | memset(&addr, 0, sizeof(addr)); | ||
405 | addr.sin_family = AF_INET; | ||
406 | addr.sin_port = htons(cb->cb_port); | ||
407 | addr.sin_addr.s_addr = htonl(cb->cb_addr); | ||
408 | |||
409 | /* Create RPC client */ | 402 | /* Create RPC client */ |
410 | client = rpc_create(&args); | 403 | client = rpc_create(&args); |
411 | if (IS_ERR(client)) { | 404 | if (IS_ERR(client)) { |