diff options
author | Bryan Schumaker <bjschuma@netapp.com> | 2012-06-20 15:53:43 -0400 |
---|---|---|
committer | Trond Myklebust <Trond.Myklebust@netapp.com> | 2012-06-29 11:46:44 -0400 |
commit | 011e2a7fd5e9e0c2fdba6b9466d53fc437f8bfaf (patch) | |
tree | b88d11754a6ed0a4cea439dc43a39fb88a5b05a8 /fs/nfs/nfs4proc.c | |
parent | a5c58892b427a2752e3ec44b0aad4ce9221dc63b (diff) |
NFS: Create a have_delegation rpc_op
Delegations are a v4 feature, so push them out of the generic code.
Signed-off-by: Bryan Schumaker <bjschuma@netapp.com>
Signed-off-by: Trond Myklebust <Trond.Myklebust@netapp.com>
Diffstat (limited to 'fs/nfs/nfs4proc.c')
-rw-r--r-- | fs/nfs/nfs4proc.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/fs/nfs/nfs4proc.c b/fs/nfs/nfs4proc.c index e9a8ad2df7af..86f428bb5e07 100644 --- a/fs/nfs/nfs4proc.c +++ b/fs/nfs/nfs4proc.c | |||
@@ -294,7 +294,7 @@ static int nfs4_handle_exception(struct nfs_server *server, int errorcode, struc | |||
294 | case 0: | 294 | case 0: |
295 | return 0; | 295 | return 0; |
296 | case -NFS4ERR_OPENMODE: | 296 | case -NFS4ERR_OPENMODE: |
297 | if (inode && nfs_have_delegation(inode, FMODE_READ)) { | 297 | if (inode && nfs4_have_delegation(inode, FMODE_READ)) { |
298 | nfs_inode_return_delegation(inode); | 298 | nfs_inode_return_delegation(inode); |
299 | exception->retry = 1; | 299 | exception->retry = 1; |
300 | return 0; | 300 | return 0; |
@@ -3466,7 +3466,7 @@ bool nfs4_write_need_cache_consistency_data(const struct nfs_write_data *data) | |||
3466 | /* Otherwise, request attributes if and only if we don't hold | 3466 | /* Otherwise, request attributes if and only if we don't hold |
3467 | * a delegation | 3467 | * a delegation |
3468 | */ | 3468 | */ |
3469 | return nfs_have_delegation(hdr->inode, FMODE_READ) == 0; | 3469 | return nfs4_have_delegation(hdr->inode, FMODE_READ) == 0; |
3470 | } | 3470 | } |
3471 | 3471 | ||
3472 | static void nfs4_proc_write_setup(struct nfs_write_data *data, struct rpc_message *msg) | 3472 | static void nfs4_proc_write_setup(struct nfs_write_data *data, struct rpc_message *msg) |
@@ -6804,6 +6804,7 @@ const struct nfs_rpc_ops nfs_v4_clientops = { | |||
6804 | .clear_acl_cache = nfs4_zap_acl_attr, | 6804 | .clear_acl_cache = nfs4_zap_acl_attr, |
6805 | .close_context = nfs4_close_context, | 6805 | .close_context = nfs4_close_context, |
6806 | .open_context = nfs4_atomic_open, | 6806 | .open_context = nfs4_atomic_open, |
6807 | .have_delegation = nfs4_have_delegation, | ||
6807 | .init_client = nfs4_init_client, | 6808 | .init_client = nfs4_init_client, |
6808 | }; | 6809 | }; |
6809 | 6810 | ||