summaryrefslogtreecommitdiffstats
path: root/fs
diff options
context:
space:
mode:
authorJ. Bruce Fields <bfields@citi.umich.edu>2009-02-23 00:52:13 +0100
committerJ. Bruce Fields <bfields@citi.umich.edu>2009-03-18 22:38:39 +0100
commit418cd20aa19b54554cab383e2fd0d1cb8c4732ee (patch)
treec101f0cd0bd6ed97bbf1781ca651e9fcf3d92c69 /fs
parentnfsd4: remove use of mutex for file_hashtable (diff)
downloadlinux-418cd20aa19b54554cab383e2fd0d1cb8c4732ee.tar.xz
linux-418cd20aa19b54554cab383e2fd0d1cb8c4732ee.zip
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>
Diffstat (limited to 'fs')
-rw-r--r--fs/nfsd/nfs4callback.c15
1 files changed, 7 insertions, 8 deletions
diff --git a/fs/nfsd/nfs4callback.c b/fs/nfsd/nfs4callback.c
index 5dcd38e5f138..8d55f5047503 100644
--- a/fs/nfsd/nfs4callback.c
+++ b/fs/nfsd/nfs4callback.c
@@ -389,12 +389,10 @@ static int do_probe_callback(void *data)
.rpc_argp = clp,
};
struct rpc_clnt *client;
- int status;
+ int status = -EINVAL;
- if (!clp->cl_principal && (clp->cl_flavor >= RPC_AUTH_GSS_KRB5)) {
- status = nfserr_cb_path_down;
+ if (!clp->cl_principal && (clp->cl_flavor >= RPC_AUTH_GSS_KRB5))
goto out_err;
- }
/* Initialize address */
memset(&addr, 0, sizeof(addr));
@@ -405,8 +403,9 @@ static int do_probe_callback(void *data)
/* Create RPC client */
client = rpc_create(&args);
if (IS_ERR(client)) {
- dprintk("NFSD: couldn't create callback client\n");
status = PTR_ERR(client);
+ dprintk("NFSD: couldn't create callback client: %d\n",
+ status);
goto out_err;
}
@@ -422,10 +421,10 @@ static int do_probe_callback(void *data)
out_release_client:
rpc_shutdown_client(client);
out_err:
- dprintk("NFSD: warning: no callback path to client %.*s\n",
- (int)clp->cl_name.len, clp->cl_name.data);
+ dprintk("NFSD: warning: no callback path to client %.*s: error %d\n",
+ (int)clp->cl_name.len, clp->cl_name.data, status);
put_nfs4_client(clp);
- return status;
+ return 0;
}
/*