aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--fs/nfs/nfs4proc.c5
1 files changed, 2 insertions, 3 deletions
diff --git a/fs/nfs/nfs4proc.c b/fs/nfs/nfs4proc.c
index a64aa56e140a..b2104461ed4f 100644
--- a/fs/nfs/nfs4proc.c
+++ b/fs/nfs/nfs4proc.c
@@ -363,9 +363,8 @@ static void renew_lease(const struct nfs_server *server, unsigned long timestamp
363 * Must be called while holding tbl->slot_tbl_lock 363 * Must be called while holding tbl->slot_tbl_lock
364 */ 364 */
365static void 365static void
366nfs4_free_slot(struct nfs4_slot_table *tbl, struct nfs4_slot *free_slot) 366nfs4_free_slot(struct nfs4_slot_table *tbl, u8 free_slotid)
367{ 367{
368 int free_slotid = free_slot - tbl->slots;
369 int slotid = free_slotid; 368 int slotid = free_slotid;
370 369
371 BUG_ON(slotid < 0 || slotid >= NFS4_MAX_SLOT_TABLE); 370 BUG_ON(slotid < 0 || slotid >= NFS4_MAX_SLOT_TABLE);
@@ -430,7 +429,7 @@ static void nfs41_sequence_free_slot(struct nfs4_sequence_res *res)
430 } 429 }
431 430
432 spin_lock(&tbl->slot_tbl_lock); 431 spin_lock(&tbl->slot_tbl_lock);
433 nfs4_free_slot(tbl, res->sr_slot); 432 nfs4_free_slot(tbl, res->sr_slot - tbl->slots);
434 nfs4_check_drain_fc_complete(res->sr_session); 433 nfs4_check_drain_fc_complete(res->sr_session);
435 spin_unlock(&tbl->slot_tbl_lock); 434 spin_unlock(&tbl->slot_tbl_lock);
436 res->sr_slot = NULL; 435 res->sr_slot = NULL;