aboutsummaryrefslogtreecommitdiffstats
path: root/fs/nfs/nfs4proc.c
diff options
context:
space:
mode:
authorTrond Myklebust <Trond.Myklebust@netapp.com>2012-11-16 12:45:06 -0500
committerTrond Myklebust <Trond.Myklebust@netapp.com>2012-11-26 17:49:51 -0500
commitdf2fabffbace8988f3265585ec793ff9deccdea7 (patch)
tree42aa051469cfd040504597235e462f2077b1ed0e /fs/nfs/nfs4proc.c
parente3725ec015dfbbeb896295cf2b3a995f28b0630e (diff)
NFSv4.1: Label each entry in the session slot tables with its slot number
Instead of doing slot table pointer gymnastics every time we want to know which slot we're using. Signed-off-by: Trond Myklebust <Trond.Myklebust@netapp.com>
Diffstat (limited to 'fs/nfs/nfs4proc.c')
-rw-r--r--fs/nfs/nfs4proc.c12
1 files changed, 7 insertions, 5 deletions
diff --git a/fs/nfs/nfs4proc.c b/fs/nfs/nfs4proc.c
index 5b61c4a83191..4311dba49c58 100644
--- a/fs/nfs/nfs4proc.c
+++ b/fs/nfs/nfs4proc.c
@@ -526,9 +526,9 @@ static int nfs41_sequence_done(struct rpc_task *task, struct nfs4_sequence_res *
526 * returned NFS4ERR_DELAY as per Section 2.10.6.2 526 * returned NFS4ERR_DELAY as per Section 2.10.6.2
527 * of RFC5661. 527 * of RFC5661.
528 */ 528 */
529 dprintk("%s: slot=%td seq=%d: Operation in progress\n", 529 dprintk("%s: slot=%u seq=%u: Operation in progress\n",
530 __func__, 530 __func__,
531 slot - session->fc_slot_table.slots, 531 slot->slot_nr,
532 slot->seq_nr); 532 slot->seq_nr);
533 goto out_retry; 533 goto out_retry;
534 default: 534 default:
@@ -671,9 +671,9 @@ int nfs4_setup_sequence(const struct nfs_server *server,
671 if (session == NULL) 671 if (session == NULL)
672 goto out; 672 goto out;
673 673
674 dprintk("--> %s clp %p session %p sr_slot %td\n", 674 dprintk("--> %s clp %p session %p sr_slot %d\n",
675 __func__, session->clp, session, res->sr_slot ? 675 __func__, session->clp, session, res->sr_slot ?
676 res->sr_slot - session->fc_slot_table.slots : -1); 676 res->sr_slot->slot_nr : -1);
677 677
678 ret = nfs41_setup_sequence(session, args, res, task); 678 ret = nfs41_setup_sequence(session, args, res, task);
679out: 679out:
@@ -5669,8 +5669,10 @@ struct nfs4_slot *nfs4_alloc_slots(struct nfs4_slot_table *table,
5669 5669
5670 tbl = kmalloc_array(max_slots, sizeof(*tbl), gfp_flags); 5670 tbl = kmalloc_array(max_slots, sizeof(*tbl), gfp_flags);
5671 if (tbl != NULL) { 5671 if (tbl != NULL) {
5672 for (i = 0; i < max_slots; i++) 5672 for (i = 0; i < max_slots; i++) {
5673 tbl[i].table = table; 5673 tbl[i].table = table;
5674 tbl[i].slot_nr = i;
5675 }
5674 } 5676 }
5675 return tbl; 5677 return tbl;
5676} 5678}