From 9f2e0c853e02089733d7178d7c497f4e6006aba5 Mon Sep 17 00:00:00 2001 From: Thomas Schoebel-Theuer Date: Sat, 13 Mar 2021 12:28:37 +0100 Subject: [PATCH] compat: old kernels without WRITE_ONCE --- kernel/compat.h | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/kernel/compat.h b/kernel/compat.h index 116b6260..d5a62a46 100644 --- a/kernel/compat.h +++ b/kernel/compat.h @@ -306,5 +306,9 @@ extern int _compat_unlink( #ifndef READ_ONCE #define READ_ONCE ACCESS_ONCE #endif +#ifndef WRITE_ONCE +/* quirk */ +#define WRITE_ONCE(dst,src) ACCESS_ONCE(dst) = (src) +#endif #endif /* _MARS_COMPAT */