Skip to content

Commit

Permalink
nfsd4: remove extra put() on callback errors
Browse files Browse the repository at this point in the history
Since rpc_call_async() guarantees that the release method will be called
even on failure, this put is wrong.

Signed-off-by: J. Bruce Fields <bfields@citi.umich.edu>
  • Loading branch information
J. Bruce Fields committed May 31, 2010
1 parent 67a3e12 commit 378b7d3
Showing 1 changed file with 1 addition and 5 deletions.
6 changes: 1 addition & 5 deletions fs/nfsd/nfs4callback.c
Original file line number Diff line number Diff line change
Expand Up @@ -752,18 +752,14 @@ static void _nfsd4_cb_recall(struct nfs4_delegation *dp)
.rpc_proc = &nfs4_cb_procedures[NFSPROC4_CLNT_CB_RECALL],
.rpc_cred = callback_cred
};
int status;

if (clnt == NULL)
return; /* Client is shutting down; give up. */

args->args_op = dp;
msg.rpc_argp = args;
dp->dl_retries = 1;
status = rpc_call_async(clnt, &msg, RPC_TASK_SOFT,
&nfsd4_cb_recall_ops, dp);
if (status)
nfs4_put_delegation(dp);
rpc_call_async(clnt, &msg, RPC_TASK_SOFT, &nfsd4_cb_recall_ops, dp);
}

void nfsd4_do_callback_rpc(struct work_struct *w)
Expand Down

0 comments on commit 378b7d3

Please sign in to comment.