Merge remote-tracking branch 'jk/vfs' into work.misc
[cascardo/linux.git] / kernel / locking / mutex-debug.h
index d06ae3b..57a871a 100644 (file)
@@ -29,12 +29,12 @@ extern void debug_mutex_init(struct mutex *lock, const char *name,
 
 static inline void mutex_set_owner(struct mutex *lock)
 {
-       lock->owner = current;
+       WRITE_ONCE(lock->owner, current);
 }
 
 static inline void mutex_clear_owner(struct mutex *lock)
 {
-       lock->owner = NULL;
+       WRITE_ONCE(lock->owner, NULL);
 }
 
 #define spin_lock_mutex(lock, flags)                   \