aboutsummaryrefslogtreecommitdiffstats
path: root/fs/nfs/nfs4proc.c
diff options
context:
space:
mode:
authorBryan Schumaker <bjschuma@netapp.com>2012-06-20 15:53:44 -0400
committerTrond Myklebust <Trond.Myklebust@netapp.com>2012-06-29 11:46:45 -0400
commit57ec14c55dee2733330327499d16e40f8c23219e (patch)
treef375d5c2c16266a55aa1d0c9a8a9e865465f1d12 /fs/nfs/nfs4proc.c
parent011e2a7fd5e9e0c2fdba6b9466d53fc437f8bfaf (diff)
NFS: Create a return_delegation rpc op
Delegations are a v4 feature, so push return_delegation out of the generic client by creating a new rpc_op and renaming the old function to be in the nfs v4 "namespace" 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.c7
1 files changed, 4 insertions, 3 deletions
diff --git a/fs/nfs/nfs4proc.c b/fs/nfs/nfs4proc.c
index 86f428bb5e07..035f7a0829ec 100644
--- a/fs/nfs/nfs4proc.c
+++ b/fs/nfs/nfs4proc.c
@@ -295,7 +295,7 @@ static int nfs4_handle_exception(struct nfs_server *server, int errorcode, struc
295 return 0; 295 return 0;
296 case -NFS4ERR_OPENMODE: 296 case -NFS4ERR_OPENMODE:
297 if (inode && nfs4_have_delegation(inode, FMODE_READ)) { 297 if (inode && nfs4_have_delegation(inode, FMODE_READ)) {
298 nfs_inode_return_delegation(inode); 298 nfs4_inode_return_delegation(inode);
299 exception->retry = 1; 299 exception->retry = 1;
300 return 0; 300 return 0;
301 } 301 }
@@ -1065,7 +1065,7 @@ static void nfs4_return_incompatible_delegation(struct inode *inode, fmode_t fmo
1065 return; 1065 return;
1066 } 1066 }
1067 rcu_read_unlock(); 1067 rcu_read_unlock();
1068 nfs_inode_return_delegation(inode); 1068 nfs4_inode_return_delegation(inode);
1069} 1069}
1070 1070
1071static struct nfs4_state *nfs4_try_open_cached(struct nfs4_opendata *opendata) 1071static struct nfs4_state *nfs4_try_open_cached(struct nfs4_opendata *opendata)
@@ -3870,7 +3870,7 @@ static int __nfs4_proc_set_acl(struct inode *inode, const void *buf, size_t bufl
3870 i = buf_to_pages_noslab(buf, buflen, arg.acl_pages, &arg.acl_pgbase); 3870 i = buf_to_pages_noslab(buf, buflen, arg.acl_pages, &arg.acl_pgbase);
3871 if (i < 0) 3871 if (i < 0)
3872 return i; 3872 return i;
3873 nfs_inode_return_delegation(inode); 3873 nfs4_inode_return_delegation(inode);
3874 ret = nfs4_call_sync(server->client, server, &msg, &arg.seq_args, &res.seq_res, 1); 3874 ret = nfs4_call_sync(server->client, server, &msg, &arg.seq_args, &res.seq_res, 1);
3875 3875
3876 /* 3876 /*
@@ -6805,6 +6805,7 @@ const struct nfs_rpc_ops nfs_v4_clientops = {
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 .have_delegation = nfs4_have_delegation,
6808 .return_delegation = nfs4_inode_return_delegation,
6808 .init_client = nfs4_init_client, 6809 .init_client = nfs4_init_client,
6809}; 6810};
6810 6811