Trond Myklebust 55a673990e NFSv4.1: Fix the callback 'highest_used_slotid' behaviour
Currently, there is no guarantee that we will call nfs4_cb_take_slot() even
though nfs4_callback_compound() will consistently call
nfs4_cb_free_slot() provided the cb_process_state has set the 'clp' field.
The result is that we can trigger the BUG_ON() upon the next call to
nfs4_cb_take_slot().

This patch fixes the above problem by using the slot id that was taken in
the CB_SEQUENCE operation as a flag for whether or not we need to call
nfs4_cb_free_slot().
It also fixes an atomicity problem: we need to set tbl->highest_used_slotid
atomically with the check for NFS4_SESSION_DRAINING, otherwise we end up
racing with the various tests in nfs4_begin_drain_session().

Cc: stable@kernel.org [2.6.38+]
Signed-off-by: Trond Myklebust <Trond.Myklebust@netapp.com>
2011-08-04 11:55:35 -04:00
..
2011-07-26 16:49:47 -07:00
2011-07-31 12:18:16 -04:00
2011-07-26 16:49:47 -07:00
2011-06-20 16:08:19 +02:00
2010-12-21 11:51:23 -05:00
2011-07-12 13:40:27 -04:00
2011-07-12 13:40:27 -04:00
2011-07-31 12:18:15 -04:00
2011-07-31 12:18:15 -04:00
2011-07-31 12:18:15 -04:00
2011-03-24 13:52:41 -04:00
2010-10-07 18:48:49 -04:00