diff options
author | Trond Myklebust <Trond.Myklebust@netapp.com> | 2007-07-05 14:55:18 -0400 |
---|---|---|
committer | Trond Myklebust <Trond.Myklebust@netapp.com> | 2007-07-10 23:40:40 -0400 |
commit | 901630278469c0d7610554227f39ed2d02d0d270 (patch) | |
tree | b530f50e5838943826a215d402b1de770d970bde /fs/nfs/delegation.h | |
parent | 2ced46c27058710a6d731d6eca77f1dd14ccde75 (diff) |
NFSv4: Support recalling delegations by stateid
There appear to be some rogue servers out there that issue multiple
delegations with different stateids for the same file. Ensure that when we
return delegations, we do so on a per-stateid basis rather than a per-file
basis.
Signed-off-by: Trond Myklebust <Trond.Myklebust@netapp.com>
Diffstat (limited to 'fs/nfs/delegation.h')
-rw-r--r-- | fs/nfs/delegation.h | 10 |
1 files changed, 1 insertions, 9 deletions
diff --git a/fs/nfs/delegation.h b/fs/nfs/delegation.h index f6e42fb21afb..7b22f1742445 100644 --- a/fs/nfs/delegation.h +++ b/fs/nfs/delegation.h | |||
@@ -26,7 +26,7 @@ struct nfs_delegation { | |||
26 | 26 | ||
27 | int nfs_inode_set_delegation(struct inode *inode, struct rpc_cred *cred, struct nfs_openres *res); | 27 | int nfs_inode_set_delegation(struct inode *inode, struct rpc_cred *cred, struct nfs_openres *res); |
28 | void nfs_inode_reclaim_delegation(struct inode *inode, struct rpc_cred *cred, struct nfs_openres *res); | 28 | void nfs_inode_reclaim_delegation(struct inode *inode, struct rpc_cred *cred, struct nfs_openres *res); |
29 | int __nfs_inode_return_delegation(struct inode *inode); | 29 | int nfs_inode_return_delegation(struct inode *inode); |
30 | int nfs_async_inode_return_delegation(struct inode *inode, const nfs4_stateid *stateid); | 30 | int nfs_async_inode_return_delegation(struct inode *inode, const nfs4_stateid *stateid); |
31 | 31 | ||
32 | struct inode *nfs_delegation_find_inode(struct nfs_client *clp, const struct nfs_fh *fhandle); | 32 | struct inode *nfs_delegation_find_inode(struct nfs_client *clp, const struct nfs_fh *fhandle); |
@@ -52,14 +52,6 @@ static inline int nfs_have_delegation(struct inode *inode, int flags) | |||
52 | return 0; | 52 | return 0; |
53 | } | 53 | } |
54 | 54 | ||
55 | static inline int nfs_inode_return_delegation(struct inode *inode) | ||
56 | { | ||
57 | int err = 0; | ||
58 | |||
59 | if (NFS_I(inode)->delegation != NULL) | ||
60 | err = __nfs_inode_return_delegation(inode); | ||
61 | return err; | ||
62 | } | ||
63 | #else | 55 | #else |
64 | static inline int nfs_have_delegation(struct inode *inode, int flags) | 56 | static inline int nfs_have_delegation(struct inode *inode, int flags) |
65 | { | 57 | { |