aboutsummaryrefslogtreecommitdiffstats
path: root/fs/nfs/nfs4_fs.h
diff options
context:
space:
mode:
authorWeston Andros Adamson <dros@netapp.com>2013-09-10 18:44:32 -0400
committerTrond Myklebust <Trond.Myklebust@netapp.com>2013-09-11 09:07:53 -0400
commitade33ff58ed3efb4a069f7256f5a92ccf8634413 (patch)
tree678d3519dde8098bf04165680773fd6370c84351 /fs/nfs/nfs4_fs.h
parent7cb852dfc858e9ab092cbbfcb3e57bae4aa7f56a (diff)
NFSv4.1: sp4_mach_cred: no need to ref count creds
The cl_machine_cred doesn't need to be reference counted here - a reference is held is for the lifetime of the struct nfs_client. Also, no need to put_rpccred the rpc_message.rpc_cred. Signed-off-by: Weston Andros Adamson <dros@netapp.com> Signed-off-by: Trond Myklebust <Trond.Myklebust@netapp.com>
Diffstat (limited to 'fs/nfs/nfs4_fs.h')
-rw-r--r--fs/nfs/nfs4_fs.h6
1 files changed, 3 insertions, 3 deletions
diff --git a/fs/nfs/nfs4_fs.h b/fs/nfs/nfs4_fs.h
index f520a1113b38..07a8aa9cd7ee 100644
--- a/fs/nfs/nfs4_fs.h
+++ b/fs/nfs/nfs4_fs.h
@@ -279,10 +279,10 @@ _nfs4_state_protect(struct nfs_client *clp, unsigned long sp4_mode,
279 if (test_bit(sp4_mode, &clp->cl_sp4_flags)) { 279 if (test_bit(sp4_mode, &clp->cl_sp4_flags)) {
280 spin_lock(&clp->cl_lock); 280 spin_lock(&clp->cl_lock);
281 if (clp->cl_machine_cred != NULL) 281 if (clp->cl_machine_cred != NULL)
282 newcred = get_rpccred(clp->cl_machine_cred); 282 /* don't call get_rpccred on the machine cred -
283 * a reference will be held for life of clp */
284 newcred = clp->cl_machine_cred;
283 spin_unlock(&clp->cl_lock); 285 spin_unlock(&clp->cl_lock);
284 if (msg->rpc_cred)
285 put_rpccred(msg->rpc_cred);
286 msg->rpc_cred = newcred; 286 msg->rpc_cred = newcred;
287 287
288 flavor = clp->cl_rpcclient->cl_auth->au_flavor; 288 flavor = clp->cl_rpcclient->cl_auth->au_flavor;