projects
/
openwrt
/
staging
/
blogic.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
b04b22f
)
NFSv4: Ensure we honour NFS_DELEGATION_RETURNING in nfs_inode_set_delegation()
author
Trond Myklebust
<
[email protected]
>
Fri, 27 Feb 2015 19:25:50 +0000
(14:25 -0500)
committer
Trond Myklebust
<
[email protected]
>
Mon, 2 Mar 2015 23:09:14 +0000
(18:09 -0500)
Ensure that nfs_inode_set_delegation() doesn't inadvertently detach a
delegation that is already in the process of being returned.
Signed-off-by: Trond Myklebust <
[email protected]
>
fs/nfs/delegation.c
patch
|
blob
|
history
diff --git
a/fs/nfs/delegation.c
b/fs/nfs/delegation.c
index d9caf73eef48d03fae231dfe580e564ab9ac71c2..5ca502b5f8778393a97a4ecdcf25bd35b0a11dab 100644
(file)
--- 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
delegation = NULL;
goto out;
}
- freeme = nfs_detach_delegation_locked(nfsi,
+ if (test_and_set_bit(NFS_DELEGATION_RETURNING,
+ &old_delegation->flags))
+ goto out;
+ freeme = nfs_detach_delegation_locked(nfsi,
old_delegation, clp);
if (freeme == NULL)
goto out;