smp_mb__before_clear_bit() was deprecated in kernel 3.16 and removed
in kernel 3.18, and was replaced by smp_mb__before_atomic(). To fix,
use clear_bit_unlock which does the old smp_mb__before_clear_bit +
clear_bit.
Signed-off-by: frank zago <fzago@cray.com>
Change-Id: I970807ee4c1d91ddda4011ffb22bbe8af0a7764b
Reviewed-on: http://review.whamcloud.com/16891
Tested-by: Jenkins
Tested-by: Maloo <hpdd-maloo@intel.com>
Reviewed-by: John L. Hammond <john.hammond@intel.com>
Reviewed-by: James Simmons <uja.ornl@yahoo.com>
Reviewed-by: Oleg Drokin <oleg.drokin@intel.com>
{
DX_DEVAL(iam_lock_stats.dls_bh_lock++);
#ifdef CONFIG_SMP
- while (test_and_set_bit(BH_DXLock, &bh->b_state)) {
+ while (test_and_set_bit_lock(BH_DXLock, &bh->b_state)) {
DX_DEVAL(iam_lock_stats.dls_bh_busy++);
while (test_bit(BH_DXLock, &bh->b_state))
cpu_relax();
static inline void iam_unlock_bh(struct buffer_head *bh)
{
#ifdef CONFIG_SMP
- smp_mb__before_clear_bit();
- clear_bit(BH_DXLock, &bh->b_state);
+ clear_bit_unlock(BH_DXLock, &bh->b_state);
#endif
}