diff options
author | Anna Schumaker <Anna.Schumaker@Netapp.com> | 2019-08-19 10:18:28 -0400 |
---|---|---|
committer | Anna Schumaker <Anna.Schumaker@Netapp.com> | 2019-08-22 10:05:35 -0400 |
commit | f836b27ecad98770bc53600d1ebd6533c921a4e7 (patch) | |
tree | 3bb0425554705aefef66ff16b5aebd472f514eba /fs | |
parent | cc15e24a3af249455158bdb2ad02b9685eb4d6e9 (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>
Diffstat (limited to 'fs')
-rw-r--r-- | fs/nfs/nfs4proc.c | 11 |
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 = { | |||
8356 | 8356 | ||
8357 | int nfs4_proc_get_lease_time(struct nfs_client *clp, struct nfs_fsinfo *fsinfo) | 8357 | int nfs4_proc_get_lease_time(struct nfs_client *clp, struct nfs_fsinfo *fsinfo) |
8358 | { | 8358 | { |
8359 | struct rpc_task *task; | ||
8360 | struct nfs4_get_lease_time_args args; | 8359 | struct nfs4_get_lease_time_args args; |
8361 | struct nfs4_get_lease_time_res res = { | 8360 | struct nfs4_get_lease_time_res res = { |
8362 | .lr_fsinfo = fsinfo, | 8361 | .lr_fsinfo = fsinfo, |
@@ -8378,17 +8377,9 @@ int nfs4_proc_get_lease_time(struct nfs_client *clp, struct nfs_fsinfo *fsinfo) | |||
8378 | .callback_data = &data, | 8377 | .callback_data = &data, |
8379 | .flags = RPC_TASK_TIMEOUT, | 8378 | .flags = RPC_TASK_TIMEOUT, |
8380 | }; | 8379 | }; |
8381 | int status; | ||
8382 | 8380 | ||
8383 | nfs4_init_sequence(&args.la_seq_args, &res.lr_seq_res, 0, 1); | 8381 | nfs4_init_sequence(&args.la_seq_args, &res.lr_seq_res, 0, 1); |
8384 | task = rpc_run_task(&task_setup); | 8382 | return nfs4_call_sync_custom(&task_setup); |
8385 | |||
8386 | if (IS_ERR(task)) | ||
8387 | return PTR_ERR(task); | ||
8388 | |||
8389 | status = task->tk_status; | ||
8390 | rpc_put_task(task); | ||
8391 | return status; | ||
8392 | } | 8383 | } |
8393 | 8384 | ||
8394 | #ifdef CONFIG_NFS_V4_1 | 8385 | #ifdef CONFIG_NFS_V4_1 |