summaryrefslogtreecommitdiffstats
path: root/fs/nfsd/nfs4state.c
diff options
context:
space:
mode:
authorDavid S. Miller <davem@davemloft.net>2011-03-10 14:26:00 -0800
committerDavid S. Miller <davem@davemloft.net>2011-03-10 14:26:00 -0800
commit33175d84ee3fa29991adb80513683e010769e807 (patch)
tree3731f61cf82451b6892cf1368701e57e35d92908 /fs/nfsd/nfs4state.c
parentc5908939b2738bafe1b309bc2465cb9f2e6184c5 (diff)
parent6dfbd87a20a737641ef228230c77f4262434fa24 (diff)
downloadlinux-33175d84ee3fa29991adb80513683e010769e807.tar.gz
linux-33175d84ee3fa29991adb80513683e010769e807.tar.bz2
linux-33175d84ee3fa29991adb80513683e010769e807.zip
Merge branch 'master' of master.kernel.org:/pub/scm/linux/kernel/git/davem/net-2.6
Conflicts: drivers/net/bnx2x/bnx2x_cmn.c
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 54b60bfceb8d..7b566ec14e18 100644
--- a/fs/nfsd/nfs4state.c
+++ b/fs/nfsd/nfs4state.c
@@ -2445,15 +2445,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)