aboutsummaryrefslogtreecommitdiffstats
path: root/fs/nfs
diff options
context:
space:
mode:
authorTrond Myklebust <Trond.Myklebust@netapp.com>2010-06-16 09:52:25 -0400
committerTrond Myklebust <Trond.Myklebust@netapp.com>2010-06-22 13:24:01 -0400
commit2a6e26cdb8f17b1075c2dfd8f2f3c341bac4f441 (patch)
treecedbb039984d1bff14977c36ced8d04a9d878b16 /fs/nfs
parentd5f8d3fe72594f2e896b407f78daf24f37ef4d53 (diff)
NFSv4.1: Clean up nfs4_setup_sequence
Firstly, there is little point in first zeroing out the entire struct nfs4_sequence_res, and then initialising all fields save one. Just initialise the last field to zero... Secondly, nfs41_setup_sequence() has only 2 possible return values: 0, or -EAGAIN, so there is no 'terminate rpc task' case. Signed-off-by: Trond Myklebust <Trond.Myklebust@netapp.com>
Diffstat (limited to 'fs/nfs')
-rw-r--r--fs/nfs/nfs4proc.c7
1 files changed, 1 insertions, 6 deletions
diff --git a/fs/nfs/nfs4proc.c b/fs/nfs/nfs4proc.c
index 89be778a6543..4bfc0b7c428f 100644
--- a/fs/nfs/nfs4proc.c
+++ b/fs/nfs/nfs4proc.c
@@ -480,7 +480,6 @@ static int nfs41_setup_sequence(struct nfs4_session *session,
480 if (res->sr_slotid != NFS4_MAX_SLOT_TABLE) 480 if (res->sr_slotid != NFS4_MAX_SLOT_TABLE)
481 return 0; 481 return 0;
482 482
483 memset(res, 0, sizeof(*res));
484 res->sr_slotid = NFS4_MAX_SLOT_TABLE; 483 res->sr_slotid = NFS4_MAX_SLOT_TABLE;
485 tbl = &session->fc_slot_table; 484 tbl = &session->fc_slot_table;
486 485
@@ -525,6 +524,7 @@ static int nfs41_setup_sequence(struct nfs4_session *session,
525 res->sr_session = session; 524 res->sr_session = session;
526 res->sr_slotid = slotid; 525 res->sr_slotid = slotid;
527 res->sr_renewal_time = jiffies; 526 res->sr_renewal_time = jiffies;
527 res->sr_status_flags = 0;
528 /* 528 /*
529 * sr_status is only set in decode_sequence, and so will remain 529 * sr_status is only set in decode_sequence, and so will remain
530 * set to 1 if an rpc level failure occurs. 530 * set to 1 if an rpc level failure occurs.
@@ -548,11 +548,6 @@ int nfs4_setup_sequence(struct nfs_client *clp,
548 goto out; 548 goto out;
549 ret = nfs41_setup_sequence(clp->cl_session, args, res, cache_reply, 549 ret = nfs41_setup_sequence(clp->cl_session, args, res, cache_reply,
550 task); 550 task);
551 if (ret && ret != -EAGAIN) {
552 /* terminate rpc task */
553 task->tk_status = ret;
554 task->tk_action = NULL;
555 }
556out: 551out:
557 dprintk("<-- %s status=%d\n", __func__, ret); 552 dprintk("<-- %s status=%d\n", __func__, ret);
558 return ret; 553 return ret;