aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--fs/nfs/nfs4proc.c8
1 files changed, 8 insertions, 0 deletions
diff --git a/fs/nfs/nfs4proc.c b/fs/nfs/nfs4proc.c
index 46e2509452a5..dc070819096a 100644
--- a/fs/nfs/nfs4proc.c
+++ b/fs/nfs/nfs4proc.c
@@ -3688,6 +3688,7 @@ struct nfs4_lockdata {
3688 unsigned long timestamp; 3688 unsigned long timestamp;
3689 int rpc_status; 3689 int rpc_status;
3690 int cancelled; 3690 int cancelled;
3691 struct nfs_server *server;
3691}; 3692};
3692 3693
3693static struct nfs4_lockdata *nfs4_alloc_lockdata(struct file_lock *fl, 3694static struct nfs4_lockdata *nfs4_alloc_lockdata(struct file_lock *fl,
@@ -3715,6 +3716,7 @@ static struct nfs4_lockdata *nfs4_alloc_lockdata(struct file_lock *fl,
3715 p->res.lock_seqid = p->arg.lock_seqid; 3716 p->res.lock_seqid = p->arg.lock_seqid;
3716 p->res.seq_res.sr_slotid = NFS4_MAX_SLOT_TABLE; 3717 p->res.seq_res.sr_slotid = NFS4_MAX_SLOT_TABLE;
3717 p->lsp = lsp; 3718 p->lsp = lsp;
3719 p->server = server;
3718 atomic_inc(&lsp->ls_count); 3720 atomic_inc(&lsp->ls_count);
3719 p->ctx = get_nfs_open_context(ctx); 3721 p->ctx = get_nfs_open_context(ctx);
3720 memcpy(&p->fl, fl, sizeof(p->fl)); 3722 memcpy(&p->fl, fl, sizeof(p->fl));
@@ -3744,6 +3746,9 @@ static void nfs4_lock_prepare(struct rpc_task *task, void *calldata)
3744 } else 3746 } else
3745 data->arg.new_lock_owner = 0; 3747 data->arg.new_lock_owner = 0;
3746 data->timestamp = jiffies; 3748 data->timestamp = jiffies;
3749 if (nfs4_setup_sequence(data->server->nfs_client, &data->arg.seq_args,
3750 &data->res.seq_res, 1, task))
3751 return;
3747 rpc_call_start(task); 3752 rpc_call_start(task);
3748 dprintk("%s: done!, ret = %d\n", __func__, data->rpc_status); 3753 dprintk("%s: done!, ret = %d\n", __func__, data->rpc_status);
3749} 3754}
@@ -3754,6 +3759,9 @@ static void nfs4_lock_done(struct rpc_task *task, void *calldata)
3754 3759
3755 dprintk("%s: begin!\n", __func__); 3760 dprintk("%s: begin!\n", __func__);
3756 3761
3762 nfs4_sequence_done_free_slot(data->server, &data->res.seq_res,
3763 task->tk_status);
3764
3757 data->rpc_status = task->tk_status; 3765 data->rpc_status = task->tk_status;
3758 if (RPC_ASSASSINATED(task)) 3766 if (RPC_ASSASSINATED(task))
3759 goto out; 3767 goto out;