aboutsummaryrefslogtreecommitdiffstats
path: root/fs/nfs/nfs4proc.c
diff options
context:
space:
mode:
authorTrond Myklebust <Trond.Myklebust@netapp.com>2010-07-01 12:49:01 -0400
committerTrond Myklebust <Trond.Myklebust@netapp.com>2010-07-30 14:46:10 -0400
commitd3c7b7ccc199ee564177ee914c04771d6bc00295 (patch)
treeed5bda669f6ede2ac454bf853577e3c3f818642b /fs/nfs/nfs4proc.c
parentdaccbded7f153ec84a3baf3136052e41d0eab555 (diff)
NFSv4: Add support for the RELEASE_LOCKOWNER operation
This is needed by NFSv4.0 servers in order to keep the number of locking stateids at a manageable level. Signed-off-by: Trond Myklebust <Trond.Myklebust@netapp.com>
Diffstat (limited to 'fs/nfs/nfs4proc.c')
-rw-r--r--fs/nfs/nfs4proc.c28
1 files changed, 28 insertions, 0 deletions
diff --git a/fs/nfs/nfs4proc.c b/fs/nfs/nfs4proc.c
index de9ff1505a24..5d3e8a2db99f 100644
--- a/fs/nfs/nfs4proc.c
+++ b/fs/nfs/nfs4proc.c
@@ -4414,6 +4414,34 @@ out:
4414 return err; 4414 return err;
4415} 4415}
4416 4416
4417static void nfs4_release_lockowner_release(void *calldata)
4418{
4419 kfree(calldata);
4420}
4421
4422const struct rpc_call_ops nfs4_release_lockowner_ops = {
4423 .rpc_release = nfs4_release_lockowner_release,
4424};
4425
4426void nfs4_release_lockowner(const struct nfs4_lock_state *lsp)
4427{
4428 struct nfs_server *server = lsp->ls_state->owner->so_server;
4429 struct nfs_release_lockowner_args *args;
4430 struct rpc_message msg = {
4431 .rpc_proc = &nfs4_procedures[NFSPROC4_CLNT_RELEASE_LOCKOWNER],
4432 };
4433
4434 if (server->nfs_client->cl_mvops->minor_version != 0)
4435 return;
4436 args = kmalloc(sizeof(*args), GFP_NOFS);
4437 if (!args)
4438 return;
4439 args->lock_owner.clientid = server->nfs_client->cl_clientid;
4440 args->lock_owner.id = lsp->ls_id.id;
4441 msg.rpc_argp = args;
4442 rpc_call_async(server->client, &msg, 0, &nfs4_release_lockowner_ops, args);
4443}
4444
4417#define XATTR_NAME_NFSV4_ACL "system.nfs4_acl" 4445#define XATTR_NAME_NFSV4_ACL "system.nfs4_acl"
4418 4446
4419int nfs4_setxattr(struct dentry *dentry, const char *key, const void *buf, 4447int nfs4_setxattr(struct dentry *dentry, const char *key, const void *buf,