summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNeil Brown <neilb@cse.unsw.edu.au>2005-03-09 16:51:30 -0800
committerLinus Torvalds <torvalds@ppc970.osdl.org>2005-03-09 16:51:30 -0800
commit759c0bc03d63ec9cee6500db0a5db4906f40fa26 (patch)
treed811188ed78155c897b41d3a7eee550f6e78c1a3
parent6d19e414a7027dc3e4ec8e56a673dc94a8b0a45f (diff)
[PATCH] nfsd4: make nfsd4_cb_recall return void
The return value of nfsd4_cb_recall isn't really used (and the errors we were returning were incorrect anyway). 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>
-rw-r--r--fs/nfsd/nfs4callback.c21
-rw-r--r--include/linux/nfsd/state.h2
2 files changed, 8 insertions, 15 deletions
diff --git a/fs/nfsd/nfs4callback.c b/fs/nfsd/nfs4callback.c
index 4a5bc80057d2..46d96ba35c1c 100644
--- a/fs/nfsd/nfs4callback.c
+++ b/fs/nfsd/nfs4callback.c
@@ -498,7 +498,6 @@ nfs4_cb_recall_done(struct rpc_task *task)
{
struct nfs4_cb_recall *cbr = (struct nfs4_cb_recall *)task->tk_calldata;
struct nfs4_delegation *dp = cbr->cbr_dp;
- int status;
/* all is well... */
if (task->tk_status == 0)
@@ -536,15 +535,14 @@ retry:
/* sleep 2 seconds before retrying recall */
set_current_state(TASK_UNINTERRUPTIBLE);
schedule_timeout(2*HZ);
- status = nfsd4_cb_recall(dp);
- dprintk("NFSD: nfs4_cb_recall_done: retry status: %d dp %p dl_flock %p\n",status,dp, dp->dl_flock);
+ nfsd4_cb_recall(dp);
}
/*
* called with dp->dl_count inc'ed.
* nfs4_lock_state() may or may not have been called.
*/
-int
+void
nfsd4_cb_recall(struct nfs4_delegation *dp)
{
struct nfs4_client *clp;
@@ -559,26 +557,21 @@ nfsd4_cb_recall(struct nfs4_delegation *dp)
clp = dp->dl_client;
clnt = clp->cl_callback.cb_client;
- status = EIO;
if ((!atomic_read(&clp->cl_callback.cb_set)) || !clnt)
- goto out_fail;
+ return;
msg.rpc_argp = cbr;
msg.rpc_resp = cbr;
msg.rpc_cred = nfsd4_lookupcred(clp,0);
+ if (IS_ERR(msg.rpc_cred))
+ return;
cbr->cbr_trunc = 0; /* XXX need to implement truncate optimization */
cbr->cbr_dp = dp;
if ((status = rpc_call_async(clnt, &msg, RPC_TASK_SOFT,
- nfs4_cb_recall_done, cbr ))) {
+ nfs4_cb_recall_done, cbr )))
dprintk("NFSD: recall_delegation: rpc_call_async failed %d\n",
status);
- goto out_fail;
- }
-out:
- return status;
-out_fail:
- status = nfserrno(status);
- goto out;
+ return;
}
diff --git a/include/linux/nfsd/state.h b/include/linux/nfsd/state.h
index a7431a1bf68e..59d497b3a6eb 100644
--- a/include/linux/nfsd/state.h
+++ b/include/linux/nfsd/state.h
@@ -289,7 +289,7 @@ extern int nfs4_check_open_reclaim(clientid_t *clid);
extern void put_nfs4_client(struct nfs4_client *clp);
extern void nfs4_free_stateowner(struct kref *kref);
extern void nfsd4_probe_callback(struct nfs4_client *clp);
-extern int nfsd4_cb_recall(struct nfs4_delegation *dp);
+extern void nfsd4_cb_recall(struct nfs4_delegation *dp);
static inline void
nfs4_put_stateowner(struct nfs4_stateowner *so)