diff options
author | Trond Myklebust <Trond.Myklebust@netapp.com> | 2012-10-22 20:28:44 -0400 |
---|---|---|
committer | Trond Myklebust <Trond.Myklebust@netapp.com> | 2012-12-05 18:30:48 -0500 |
commit | d9afbd1b0889e7da6742e9c67ccc7becc4161f65 (patch) | |
tree | 7ca0f67463f1b438260713d4f028dabf98e25a03 /fs/nfs/nfs4filelayout.c | |
parent | 6ba7db3420c0dbf3ede16f19a593e6a80edc043f (diff) |
NFSv4.1: Simplify the sequence setup
Nobody calls nfs4_setup_sequence or nfs41_setup_sequence without
also calling rpc_call_start() on success. This commit therefore
folds the rpc_call_start call into nfs41_setup_sequence().
Signed-off-by: Trond Myklebust <Trond.Myklebust@netapp.com>
Diffstat (limited to 'fs/nfs/nfs4filelayout.c')
-rw-r--r-- | fs/nfs/nfs4filelayout.c | 30 |
1 files changed, 12 insertions, 18 deletions
diff --git a/fs/nfs/nfs4filelayout.c b/fs/nfs/nfs4filelayout.c index 591a1a7f8f9..1e42413fab8 100644 --- a/fs/nfs/nfs4filelayout.c +++ b/fs/nfs/nfs4filelayout.c | |||
@@ -307,12 +307,10 @@ static void filelayout_read_prepare(struct rpc_task *task, void *data) | |||
307 | } | 307 | } |
308 | rdata->read_done_cb = filelayout_read_done_cb; | 308 | rdata->read_done_cb = filelayout_read_done_cb; |
309 | 309 | ||
310 | if (nfs41_setup_sequence(rdata->ds_clp->cl_session, | 310 | nfs41_setup_sequence(rdata->ds_clp->cl_session, |
311 | &rdata->args.seq_args, &rdata->res.seq_res, | 311 | &rdata->args.seq_args, |
312 | task)) | 312 | &rdata->res.seq_res, |
313 | return; | 313 | task); |
314 | |||
315 | rpc_call_start(task); | ||
316 | } | 314 | } |
317 | 315 | ||
318 | static void filelayout_read_call_done(struct rpc_task *task, void *data) | 316 | static void filelayout_read_call_done(struct rpc_task *task, void *data) |
@@ -409,12 +407,10 @@ static void filelayout_write_prepare(struct rpc_task *task, void *data) | |||
409 | rpc_exit(task, 0); | 407 | rpc_exit(task, 0); |
410 | return; | 408 | return; |
411 | } | 409 | } |
412 | if (nfs41_setup_sequence(wdata->ds_clp->cl_session, | 410 | nfs41_setup_sequence(wdata->ds_clp->cl_session, |
413 | &wdata->args.seq_args, &wdata->res.seq_res, | 411 | &wdata->args.seq_args, |
414 | task)) | 412 | &wdata->res.seq_res, |
415 | return; | 413 | task); |
416 | |||
417 | rpc_call_start(task); | ||
418 | } | 414 | } |
419 | 415 | ||
420 | static void filelayout_write_call_done(struct rpc_task *task, void *data) | 416 | static void filelayout_write_call_done(struct rpc_task *task, void *data) |
@@ -450,12 +446,10 @@ static void filelayout_commit_prepare(struct rpc_task *task, void *data) | |||
450 | { | 446 | { |
451 | struct nfs_commit_data *wdata = data; | 447 | struct nfs_commit_data *wdata = data; |
452 | 448 | ||
453 | if (nfs41_setup_sequence(wdata->ds_clp->cl_session, | 449 | nfs41_setup_sequence(wdata->ds_clp->cl_session, |
454 | &wdata->args.seq_args, &wdata->res.seq_res, | 450 | &wdata->args.seq_args, |
455 | task)) | 451 | &wdata->res.seq_res, |
456 | return; | 452 | task); |
457 | |||
458 | rpc_call_start(task); | ||
459 | } | 453 | } |
460 | 454 | ||
461 | static void filelayout_write_commit_done(struct rpc_task *task, void *data) | 455 | static void filelayout_write_commit_done(struct rpc_task *task, void *data) |