aboutsummaryrefslogtreecommitdiffstats
path: root/fs/nfs/nfs4proc.c
diff options
context:
space:
mode:
authorAndy Adamson <andros@netapp.com>2009-04-01 09:22:23 -0400
committerBenny Halevy <bhalevy@panasas.com>2009-06-17 13:46:46 -0400
commita893693c151433a1375060ecb13419080426bc08 (patch)
treec824ec4aa8e1aac88d7e16b8f104090ebaf2e0d4 /fs/nfs/nfs4proc.c
parent66179efee31f431ab538016b4ac05edaf87525dc (diff)
nfs41: locku sequence setup/done support
Separate nfs4_locku calls from nfs41: sequence setup/done support Call nfs4_sequence_done from respective rpc_call_done methods. Note that we need to pass a pointer to the nfs_server in calls data for passing on to nfs4_sequence_done. Signed-off-by: Andy Adamson <andros@netapp.com> Signed-off-by: Benny Halevy <bhalevy@panasas.com> [pnfs: client data server write validate and release] Signed-off-by: Andy Adamson <andros@umich.edu> Signed-off-by: Benny Halevy <bhalevy@panasas.com> [nfs41: nfs4_sequence_free_slot use nfs_client for data server] Signed-off-by: Andy Adamson <andros@netapp.com> Signed-off-by: Benny Halevy <bhalevy@panasas.com> Signed-off-by: Trond Myklebust <Trond.Myklebust@netapp.com>
Diffstat (limited to 'fs/nfs/nfs4proc.c')
-rw-r--r--fs/nfs/nfs4proc.c10
1 files changed, 9 insertions, 1 deletions
diff --git a/fs/nfs/nfs4proc.c b/fs/nfs/nfs4proc.c
index dc070819096a..d2cfa4f86537 100644
--- a/fs/nfs/nfs4proc.c
+++ b/fs/nfs/nfs4proc.c
@@ -3533,7 +3533,7 @@ static struct nfs4_unlockdata *nfs4_alloc_unlockdata(struct file_lock *fl,
3533 struct nfs4_unlockdata *p; 3533 struct nfs4_unlockdata *p;
3534 struct inode *inode = lsp->ls_state->inode; 3534 struct inode *inode = lsp->ls_state->inode;
3535 3535
3536 p = kmalloc(sizeof(*p), GFP_KERNEL); 3536 p = kzalloc(sizeof(*p), GFP_KERNEL);
3537 if (p == NULL) 3537 if (p == NULL)
3538 return NULL; 3538 return NULL;
3539 p->arg.fh = NFS_FH(inode); 3539 p->arg.fh = NFS_FH(inode);
@@ -3564,6 +3564,8 @@ static void nfs4_locku_done(struct rpc_task *task, void *data)
3564{ 3564{
3565 struct nfs4_unlockdata *calldata = data; 3565 struct nfs4_unlockdata *calldata = data;
3566 3566
3567 nfs4_sequence_done(calldata->server, &calldata->res.seq_res,
3568 task->tk_status);
3567 if (RPC_ASSASSINATED(task)) 3569 if (RPC_ASSASSINATED(task))
3568 return; 3570 return;
3569 switch (task->tk_status) { 3571 switch (task->tk_status) {
@@ -3582,6 +3584,8 @@ static void nfs4_locku_done(struct rpc_task *task, void *data)
3582 if (nfs4_async_handle_error(task, calldata->server, NULL) == -EAGAIN) 3584 if (nfs4_async_handle_error(task, calldata->server, NULL) == -EAGAIN)
3583 rpc_restart_call(task); 3585 rpc_restart_call(task);
3584 } 3586 }
3587 nfs4_sequence_free_slot(calldata->server->nfs_client,
3588 &calldata->res.seq_res);
3585} 3589}
3586 3590
3587static void nfs4_locku_prepare(struct rpc_task *task, void *data) 3591static void nfs4_locku_prepare(struct rpc_task *task, void *data)
@@ -3596,6 +3600,10 @@ static void nfs4_locku_prepare(struct rpc_task *task, void *data)
3596 return; 3600 return;
3597 } 3601 }
3598 calldata->timestamp = jiffies; 3602 calldata->timestamp = jiffies;
3603 if (nfs4_setup_sequence(calldata->server->nfs_client,
3604 &calldata->arg.seq_args,
3605 &calldata->res.seq_res, 1, task))
3606 return;
3599 rpc_call_start(task); 3607 rpc_call_start(task);
3600} 3608}
3601 3609