From: Peter Zijlstra Date: Thu, 24 Nov 2016 11:46:26 +0000 (+0100) Subject: locking/ww_mutex: Use relaxed atomics X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=f4ec57b632fe15ed7a355099cb96ed4b647416de;p=GitHub%2FLineageOS%2Fandroid_kernel_motorola_exynos9610.git locking/ww_mutex: Use relaxed atomics The stamp is a sequence number, we don't care about memory ordering. Signed-off-by: Peter Zijlstra (Intel) Cc: Boqun Feng Cc: Linus Torvalds Cc: Peter Zijlstra Cc: Thomas Gleixner Cc: Will Deacon Cc: linux-kernel@vger.kernel.org Signed-off-by: Ingo Molnar --- diff --git a/include/linux/ww_mutex.h b/include/linux/ww_mutex.h index 2bb5deb0012e..7b0066814fa0 100644 --- a/include/linux/ww_mutex.h +++ b/include/linux/ww_mutex.h @@ -120,7 +120,7 @@ static inline void ww_acquire_init(struct ww_acquire_ctx *ctx, struct ww_class *ww_class) { ctx->task = current; - ctx->stamp = atomic_long_inc_return(&ww_class->stamp); + ctx->stamp = atomic_long_inc_return_relaxed(&ww_class->stamp); ctx->acquired = 0; #ifdef CONFIG_DEBUG_MUTEXES ctx->ww_class = ww_class;