diff options
author | Trond Myklebust <Trond.Myklebust@netapp.com> | 2007-10-11 15:11:51 -0400 |
---|---|---|
committer | Trond Myklebust <Trond.Myklebust@netapp.com> | 2007-10-11 15:11:51 -0400 |
commit | 05c88babab957dfd63bd351b25042d80bd854dd0 (patch) | |
tree | 2d491ca1e3a9ce141fd367750726049eca3f01f1 /fs/nfs | |
parent | f43bf0bebed7c33b698a8a25f95812f9e87c3843 (diff) | |
download | linux-stable-05c88babab957dfd63bd351b25042d80bd854dd0.tar.gz linux-stable-05c88babab957dfd63bd351b25042d80bd854dd0.tar.bz2 linux-stable-05c88babab957dfd63bd351b25042d80bd854dd0.zip |
NFSv4: Fix a typo in nfs_inode_reclaim_delegation
We were intending to put the previous instance of delegation->cred
before setting a new one.
Thanks to David Howells for spotting this.
Signed-off-by: Trond Myklebust <Trond.Myklebust@netapp.com>
Diffstat (limited to 'fs/nfs')
-rw-r--r-- | fs/nfs/delegation.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/fs/nfs/delegation.c b/fs/nfs/delegation.c index 7a1b6e869f9c..af8b235d405d 100644 --- a/fs/nfs/delegation.c +++ b/fs/nfs/delegation.c @@ -109,6 +109,7 @@ again: void nfs_inode_reclaim_delegation(struct inode *inode, struct rpc_cred *cred, struct nfs_openres *res) { struct nfs_delegation *delegation = NFS_I(inode)->delegation; + struct rpc_cred *oldcred; if (delegation == NULL) return; @@ -116,11 +117,12 @@ void nfs_inode_reclaim_delegation(struct inode *inode, struct rpc_cred *cred, st sizeof(delegation->stateid.data)); delegation->type = res->delegation_type; delegation->maxsize = res->maxsize; - put_rpccred(cred); + oldcred = delegation->cred; delegation->cred = get_rpccred(cred); delegation->flags &= ~NFS_DELEGATION_NEED_RECLAIM; NFS_I(inode)->delegation_state = delegation->type; smp_wmb(); + put_rpccred(oldcred); } /* |