From 279e4dd34e18de0f8ecda61b65d6e0f56f7c9fc8 Mon Sep 17 00:00:00 2001 From: frank zago Date: Mon, 1 Aug 2016 12:05:55 -0400 Subject: [PATCH] LU-7311 osd: smp_mb__before_clear_bit deprecated since kernel 3.16 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 Change-Id: I970807ee4c1d91ddda4011ffb22bbe8af0a7764b Reviewed-on: http://review.whamcloud.com/16891 Tested-by: Jenkins Tested-by: Maloo Reviewed-by: John L. Hammond Reviewed-by: James Simmons Reviewed-by: Oleg Drokin --- lustre/osd-ldiskfs/osd_iam.h | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/lustre/osd-ldiskfs/osd_iam.h b/lustre/osd-ldiskfs/osd_iam.h index 40c528b..e8e868a 100644 --- a/lustre/osd-ldiskfs/osd_iam.h +++ b/lustre/osd-ldiskfs/osd_iam.h @@ -1038,7 +1038,7 @@ static inline void iam_lock_bh(struct buffer_head volatile *bh) { 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(); @@ -1049,8 +1049,7 @@ static inline void iam_lock_bh(struct buffer_head volatile *bh) 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 } -- 1.8.3.1