nfsd4: fix do_probe_callback errors
The errors returned aren't used. Just return 0 and make them available to a dprintk(). Also, consistently use -ERRNO errors instead of nfs errors. Signed-off-by: J. Bruce Fields <bfields@citi.umich.edu> Reviewed-by: Benny Halevy <bhalevy@panasas.com>
This commit is contained in:
@@ -389,12 +389,10 @@ static int do_probe_callback(void *data)
|
|||||||
.rpc_argp = clp,
|
.rpc_argp = clp,
|
||||||
};
|
};
|
||||||
struct rpc_clnt *client;
|
struct rpc_clnt *client;
|
||||||
int status;
|
int status = -EINVAL;
|
||||||
|
|
||||||
if (!clp->cl_principal && (clp->cl_flavor >= RPC_AUTH_GSS_KRB5)) {
|
if (!clp->cl_principal && (clp->cl_flavor >= RPC_AUTH_GSS_KRB5))
|
||||||
status = nfserr_cb_path_down;
|
|
||||||
goto out_err;
|
goto out_err;
|
||||||
}
|
|
||||||
|
|
||||||
/* Initialize address */
|
/* Initialize address */
|
||||||
memset(&addr, 0, sizeof(addr));
|
memset(&addr, 0, sizeof(addr));
|
||||||
@@ -405,8 +403,9 @@ static int do_probe_callback(void *data)
|
|||||||
/* Create RPC client */
|
/* Create RPC client */
|
||||||
client = rpc_create(&args);
|
client = rpc_create(&args);
|
||||||
if (IS_ERR(client)) {
|
if (IS_ERR(client)) {
|
||||||
dprintk("NFSD: couldn't create callback client\n");
|
|
||||||
status = PTR_ERR(client);
|
status = PTR_ERR(client);
|
||||||
|
dprintk("NFSD: couldn't create callback client: %d\n",
|
||||||
|
status);
|
||||||
goto out_err;
|
goto out_err;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -422,10 +421,10 @@ static int do_probe_callback(void *data)
|
|||||||
out_release_client:
|
out_release_client:
|
||||||
rpc_shutdown_client(client);
|
rpc_shutdown_client(client);
|
||||||
out_err:
|
out_err:
|
||||||
dprintk("NFSD: warning: no callback path to client %.*s\n",
|
dprintk("NFSD: warning: no callback path to client %.*s: error %d\n",
|
||||||
(int)clp->cl_name.len, clp->cl_name.data);
|
(int)clp->cl_name.len, clp->cl_name.data, status);
|
||||||
put_nfs4_client(clp);
|
put_nfs4_client(clp);
|
||||||
return status;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
|
Reference in New Issue
Block a user