linux-nfs.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] nfs41: Initialize slot->seq_nr at nfs4_init_slot_table()
@ 2012-02-14 21:48 Vitaliy Gusev
  2012-02-14 22:46 ` Myklebust, Trond
  2012-02-15 15:15 ` Andy Adamson
  0 siblings, 2 replies; 21+ messages in thread
From: Vitaliy Gusev @ 2012-02-14 21:48 UTC (permalink / raw)
  To: trond.myklebust; +Cc: andros, linux-nfs, Vitaliy Gusev

Uninitialized seq_nr causes sending first SESSION request
with sa_sequenceid = 0.

Signed-off-by: Vitaliy Gusev <gusev.vitaliy@nexenta.com>
---
 fs/nfs/nfs4proc.c |    3 +++
 1 files changed, 3 insertions(+), 0 deletions(-)

diff --git a/fs/nfs/nfs4proc.c b/fs/nfs/nfs4proc.c
index f0c849c..711a812 100644
--- a/fs/nfs/nfs4proc.c
+++ b/fs/nfs/nfs4proc.c
@@ -5067,6 +5067,7 @@ static int nfs4_init_slot_table(struct nfs4_slot_table *tbl,
 		int max_slots, int ivalue)
 {
 	struct nfs4_slot *slot;
+	int i;
 	int ret = -ENOMEM;
 
 	BUG_ON(max_slots > NFS4_MAX_SLOT_TABLE);
@@ -5082,6 +5083,8 @@ static int nfs4_init_slot_table(struct nfs4_slot_table *tbl,
 	tbl->max_slots = max_slots;
 	tbl->slots = slot;
 	tbl->highest_used_slotid = -1;  /* no slot is currently used */
+	for (i = 0; i < tbl->max_slots; ++i)
+		tbl->slots[i].seq_nr = ivalue;
 	spin_unlock(&tbl->slot_tbl_lock);
 	dprintk("%s: tbl=%p slots=%p max_slots=%d\n", __func__,
 		tbl, tbl->slots, tbl->max_slots);
-- 
1.7.5.4


^ permalink raw reply related	[flat|nested] 21+ messages in thread

end of thread, other threads:[~2012-02-15 18:45 UTC | newest]

Thread overview: 21+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-02-14 21:48 [PATCH] nfs41: Initialize slot->seq_nr at nfs4_init_slot_table() Vitaliy Gusev
2012-02-14 22:46 ` Myklebust, Trond
2012-02-15  0:34   ` Vitaliy Gusev
2012-02-15  0:43     ` Myklebust, Trond
2012-02-15  0:53       ` J. Bruce Fields
2012-02-15  1:50         ` Myklebust, Trond
2012-02-15  2:30           ` Myklebust, Trond
2012-02-15 14:11             ` Vitaliy Gusev
2012-02-15 15:07             ` Adamson, Andy
2012-02-15 15:46               ` Myklebust, Trond
2012-02-15 16:06                 ` Andy Adamson
2012-02-15 18:37                   ` Myklebust, Trond
2012-02-15 18:45                     ` Adamson, Andy
2012-02-15 15:01           ` Adamson, Andy
2012-02-15 15:06             ` Vitaliy Gusev
2012-02-15 15:16               ` Andy Adamson
2012-02-15 15:27                 ` Vitaliy Gusev
2012-02-15 15:29             ` Myklebust, Trond
2012-02-15 15:45               ` Andy Adamson
2012-02-15 15:52           ` J. Bruce Fields
2012-02-15 15:15 ` Andy Adamson

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).