summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAnna Schumaker <Anna.Schumaker@Netapp.com>2019-08-19 10:18:28 -0400
committerAnna Schumaker <Anna.Schumaker@Netapp.com>2019-08-22 10:05:35 -0400
commitf836b27ecad98770bc53600d1ebd6533c921a4e7 (patch)
tree3bb0425554705aefef66ff16b5aebd472f514eba
parentcc15e24a3af249455158bdb2ad02b9685eb4d6e9 (diff)
NFS: Have nfs4_proc_get_lease_time() call nfs4_call_sync_custom()
This removes some code duplication, since both functions were doing the same thing. Signed-off-by: Anna Schumaker <Anna.Schumaker@Netapp.com>
-rw-r--r--fs/nfs/nfs4proc.c11
1 files changed, 1 insertions, 10 deletions
diff --git a/fs/nfs/nfs4proc.c b/fs/nfs/nfs4proc.c
index df12af8f6b36..00c7a92e3d6b 100644
--- a/fs/nfs/nfs4proc.c
+++ b/fs/nfs/nfs4proc.c
@@ -8356,7 +8356,6 @@ static const struct rpc_call_ops nfs4_get_lease_time_ops = {
int nfs4_proc_get_lease_time(struct nfs_client *clp, struct nfs_fsinfo *fsinfo)
{
- struct rpc_task *task;
struct nfs4_get_lease_time_args args;
struct nfs4_get_lease_time_res res = {
.lr_fsinfo = fsinfo,
@@ -8378,17 +8377,9 @@ int nfs4_proc_get_lease_time(struct nfs_client *clp, struct nfs_fsinfo *fsinfo)
.callback_data = &data,
.flags = RPC_TASK_TIMEOUT,
};
- int status;
nfs4_init_sequence(&args.la_seq_args, &res.lr_seq_res, 0, 1);
- task = rpc_run_task(&task_setup);
-
- if (IS_ERR(task))
- return PTR_ERR(task);
-
- status = task->tk_status;
- rpc_put_task(task);
- return status;
+ return nfs4_call_sync_custom(&task_setup);
}
#ifdef CONFIG_NFS_V4_1