diff options
-rw-r--r-- | fs/nfs/delegation.c | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/fs/nfs/delegation.c b/fs/nfs/delegation.c index d9caf73eef48..5ca502b5f877 100644 --- a/fs/nfs/delegation.c +++ b/fs/nfs/delegation.c | |||
@@ -370,7 +370,10 @@ int nfs_inode_set_delegation(struct inode *inode, struct rpc_cred *cred, struct | |||
370 | delegation = NULL; | 370 | delegation = NULL; |
371 | goto out; | 371 | goto out; |
372 | } | 372 | } |
373 | freeme = nfs_detach_delegation_locked(nfsi, | 373 | if (test_and_set_bit(NFS_DELEGATION_RETURNING, |
374 | &old_delegation->flags)) | ||
375 | goto out; | ||
376 | freeme = nfs_detach_delegation_locked(nfsi, | ||
374 | old_delegation, clp); | 377 | old_delegation, clp); |
375 | if (freeme == NULL) | 378 | if (freeme == NULL) |
376 | goto out; | 379 | goto out; |