Skip to content

Commit

Permalink
NFS: Have nfs4_proc_get_lease_time() call nfs4_call_sync_custom()
Browse files Browse the repository at this point in the history
This removes some code duplication, since both functions were doing the
same thing.

Signed-off-by: Anna Schumaker <Anna.Schumaker@Netapp.com>
  • Loading branch information
Anna Schumaker authored and Anna Schumaker committed Aug 22, 2019
1 parent cc15e24 commit f836b27
Showing 1 changed file with 1 addition and 10 deletions.
11 changes: 1 addition & 10 deletions fs/nfs/nfs4proc.c
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand All @@ -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
Expand Down

0 comments on commit f836b27

Please sign in to comment.