mirror of
https://github.com/Fishwaldo/Star64_linux.git
synced 2025-06-26 00:21:17 +00:00
[PATCH] nfsd4: callback create rpc client returns
rpc_create_clnt and friends return errors, not NULL, on failure. Signed-off-by: J. Bruce Fields <bfields@citi.umich.edu> Signed-off-by: Neil Brown <neilb@cse.unsw.edu.au> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
This commit is contained in:
parent
9e416052f1
commit
f1ee4f22f2
1 changed files with 4 additions and 2 deletions
|
@ -405,7 +405,8 @@ nfsd4_probe_callback(struct nfs4_client *clp)
|
||||||
timeparms.to_exponential = 1;
|
timeparms.to_exponential = 1;
|
||||||
|
|
||||||
/* Create RPC transport */
|
/* Create RPC transport */
|
||||||
if (!(xprt = xprt_create_proto(IPPROTO_TCP, &addr, &timeparms))) {
|
xprt = xprt_create_proto(IPPROTO_TCP, &addr, &timeparms);
|
||||||
|
if (IS_ERR(xprt)) {
|
||||||
dprintk("NFSD: couldn't create callback transport!\n");
|
dprintk("NFSD: couldn't create callback transport!\n");
|
||||||
goto out_err;
|
goto out_err;
|
||||||
}
|
}
|
||||||
|
@ -426,7 +427,8 @@ nfsd4_probe_callback(struct nfs4_client *clp)
|
||||||
* XXX AUTH_UNIX only - need AUTH_GSS....
|
* XXX AUTH_UNIX only - need AUTH_GSS....
|
||||||
*/
|
*/
|
||||||
sprintf(hostname, "%u.%u.%u.%u", NIPQUAD(addr.sin_addr.s_addr));
|
sprintf(hostname, "%u.%u.%u.%u", NIPQUAD(addr.sin_addr.s_addr));
|
||||||
if (!(clnt = rpc_create_client(xprt, hostname, program, 1, RPC_AUTH_UNIX))) {
|
clnt = rpc_create_client(xprt, hostname, program, 1, RPC_AUTH_UNIX);
|
||||||
|
if (IS_ERR(clnt)) {
|
||||||
dprintk("NFSD: couldn't create callback client\n");
|
dprintk("NFSD: couldn't create callback client\n");
|
||||||
goto out_xprt;
|
goto out_xprt;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue