diff options
-rw-r--r-- | fs/nfsd/nfs4state.c | 13 |
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) | |||
2445 | static struct nfs4_delegation * | 2445 | static struct nfs4_delegation * |
2446 | find_delegation_file(struct nfs4_file *fp, stateid_t *stid) | 2446 | find_delegation_file(struct nfs4_file *fp, stateid_t *stid) |
2447 | { | 2447 | { |
2448 | struct nfs4_delegation *dp = NULL; | 2448 | struct nfs4_delegation *dp; |
2449 | 2449 | ||
2450 | spin_lock(&recall_lock); | 2450 | spin_lock(&recall_lock); |
2451 | list_for_each_entry(dp, &fp->fi_delegations, dl_perfile) { | 2451 | list_for_each_entry(dp, &fp->fi_delegations, dl_perfile) |
2452 | if (dp->dl_stateid.si_stateownerid == stid->si_stateownerid) | 2452 | if (dp->dl_stateid.si_stateownerid == stid->si_stateownerid) { |
2453 | break; | 2453 | spin_unlock(&recall_lock); |
2454 | } | 2454 | return dp; |
2455 | } | ||
2455 | spin_unlock(&recall_lock); | 2456 | spin_unlock(&recall_lock); |
2456 | return dp; | 2457 | return NULL; |
2457 | } | 2458 | } |
2458 | 2459 | ||
2459 | int share_access_to_flags(u32 share_access) | 2460 | int share_access_to_flags(u32 share_access) |