Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 346584
b: refs/heads/master
c: f4af6e2
h: refs/heads/master
v: v3
  • Loading branch information
Trond Myklebust authored and Trond Myklebust committed Nov 26, 2012
1 parent ccf2b7e commit bc12bf0
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 6 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 2dc03b7f00d7fcd7dbb9302c5ebbd0c2b7fa3557
refs/heads/master: f4af6e2abc8efb1695203a2b76876edf80f79960
12 changes: 7 additions & 5 deletions trunk/fs/nfs/nfs4proc.c
Original file line number Diff line number Diff line change
Expand Up @@ -412,16 +412,18 @@ static void renew_lease(const struct nfs_server *server, unsigned long timestamp
* Must be called while holding tbl->slot_tbl_lock
*/
static void
nfs4_free_slot(struct nfs4_slot_table *tbl, u32 slotid)
nfs4_free_slot(struct nfs4_slot_table *tbl, struct nfs4_slot *slot)
{
u32 slotid = slot->slot_nr;

/* clear used bit in bitmap */
__clear_bit(slotid, tbl->used_slots);

/* update highest_used_slotid when it is freed */
if (slotid == tbl->highest_used_slotid) {
slotid = find_last_bit(tbl->used_slots, tbl->max_slots);
if (slotid < tbl->max_slots)
tbl->highest_used_slotid = slotid;
u32 new_max = find_last_bit(tbl->used_slots, slotid);
if (new_max < slotid)
tbl->highest_used_slotid = new_max;
else
tbl->highest_used_slotid = NFS4_NO_SLOT;
}
Expand Down Expand Up @@ -480,7 +482,7 @@ static void nfs41_sequence_free_slot(struct nfs4_sequence_res *res)
session = tbl->session;

spin_lock(&tbl->slot_tbl_lock);
nfs4_free_slot(tbl, res->sr_slot - tbl->slots);
nfs4_free_slot(tbl, res->sr_slot);
nfs4_check_drain_fc_complete(session);
spin_unlock(&tbl->slot_tbl_lock);
res->sr_slot = NULL;
Expand Down

0 comments on commit bc12bf0

Please sign in to comment.