aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--fs/nfs/nfs4proc.c24
1 files changed, 23 insertions, 1 deletions
diff --git a/fs/nfs/nfs4proc.c b/fs/nfs/nfs4proc.c
index fbd6274f14f8..dc0feb5837b1 100644
--- a/fs/nfs/nfs4proc.c
+++ b/fs/nfs/nfs4proc.c
@@ -3360,6 +3360,10 @@ struct nfs4_delegreturndata {
3360static void nfs4_delegreturn_done(struct rpc_task *task, void *calldata) 3360static void nfs4_delegreturn_done(struct rpc_task *task, void *calldata)
3361{ 3361{
3362 struct nfs4_delegreturndata *data = calldata; 3362 struct nfs4_delegreturndata *data = calldata;
3363
3364 nfs4_sequence_done_free_slot(data->res.server, &data->res.seq_res,
3365 task->tk_status);
3366
3363 data->rpc_status = task->tk_status; 3367 data->rpc_status = task->tk_status;
3364 if (data->rpc_status == 0) 3368 if (data->rpc_status == 0)
3365 renew_lease(data->res.server, data->timestamp); 3369 renew_lease(data->res.server, data->timestamp);
@@ -3370,7 +3374,25 @@ static void nfs4_delegreturn_release(void *calldata)
3370 kfree(calldata); 3374 kfree(calldata);
3371} 3375}
3372 3376
3377#if defined(CONFIG_NFS_V4_1)
3378static void nfs4_delegreturn_prepare(struct rpc_task *task, void *data)
3379{
3380 struct nfs4_delegreturndata *d_data;
3381
3382 d_data = (struct nfs4_delegreturndata *)data;
3383
3384 if (nfs4_setup_sequence(d_data->res.server->nfs_client,
3385 &d_data->args.seq_args,
3386 &d_data->res.seq_res, 1, task))
3387 return;
3388 rpc_call_start(task);
3389}
3390#endif /* CONFIG_NFS_V4_1 */
3391
3373static const struct rpc_call_ops nfs4_delegreturn_ops = { 3392static const struct rpc_call_ops nfs4_delegreturn_ops = {
3393#if defined(CONFIG_NFS_V4_1)
3394 .rpc_call_prepare = nfs4_delegreturn_prepare,
3395#endif /* CONFIG_NFS_V4_1 */
3374 .rpc_call_done = nfs4_delegreturn_done, 3396 .rpc_call_done = nfs4_delegreturn_done,
3375 .rpc_release = nfs4_delegreturn_release, 3397 .rpc_release = nfs4_delegreturn_release,
3376}; 3398};
@@ -3392,7 +3414,7 @@ static int _nfs4_proc_delegreturn(struct inode *inode, struct rpc_cred *cred, co
3392 }; 3414 };
3393 int status = 0; 3415 int status = 0;
3394 3416
3395 data = kmalloc(sizeof(*data), GFP_KERNEL); 3417 data = kzalloc(sizeof(*data), GFP_KERNEL);
3396 if (data == NULL) 3418 if (data == NULL)
3397 return -ENOMEM; 3419 return -ENOMEM;
3398 data->args.fhandle = &data->fh; 3420 data->args.fhandle = &data->fh;