summaryrefslogtreecommitdiffstats
path: root/fs/nfsd/nfs4state.c
diff options
context:
space:
mode:
authorJ. Bruce Fields <bfields@redhat.com>2011-03-17 13:07:20 -0400
committerJ. Bruce Fields <bfields@redhat.com>2011-03-17 13:07:25 -0400
commitcf507b6f8ebae89c0e7bbd00abc6d8887c9035b1 (patch)
tree834a5c5bbd63aed0756d47978679d230d5dedec4 /fs/nfsd/nfs4state.c
parent9ae78bcc000168251f893b1bf92a848308187695 (diff)
parent3ec07aa9522e3d5e9d5ede7bef946756e623a0a0 (diff)
downloadlinux-cf507b6f8ebae89c0e7bbd00abc6d8887c9035b1.tar.bz2
Merge create_session decoding fix into for-2.6.39
This needs a further fixup!
Diffstat (limited to 'fs/nfsd/nfs4state.c')
-rw-r--r--fs/nfsd/nfs4state.c13
1 files changed, 7 insertions, 6 deletions
diff --git a/fs/nfsd/nfs4state.c b/fs/nfsd/nfs4state.c
index a20827804c50..fbde6f79922e 100644
--- a/fs/nfsd/nfs4state.c
+++ b/fs/nfsd/nfs4state.c
@@ -2446,15 +2446,16 @@ nfs4_check_delegmode(struct nfs4_delegation *dp, int flags)
static struct nfs4_delegation *
find_delegation_file(struct nfs4_file *fp, stateid_t *stid)
{
- struct nfs4_delegation *dp = NULL;
+ struct nfs4_delegation *dp;
spin_lock(&recall_lock);
- list_for_each_entry(dp, &fp->fi_delegations, dl_perfile) {
- if (dp->dl_stateid.si_stateownerid == stid->si_stateownerid)
- break;
- }
+ list_for_each_entry(dp, &fp->fi_delegations, dl_perfile)
+ if (dp->dl_stateid.si_stateownerid == stid->si_stateownerid) {
+ spin_unlock(&recall_lock);
+ return dp;
+ }
spin_unlock(&recall_lock);
- return dp;
+ return NULL;
}
int share_access_to_flags(u32 share_access)