staging: android: describe use of memory barrier on sync.c
Added comments describing the purpose of using write memory
barrier in the context of sync_timeline_destory.
Signed-off-by: Niv Yehezkel <executerx@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
diff --git a/drivers/staging/android/sync.c b/drivers/staging/android/sync.c
index 1f88c5d..18174f7 100644
--- a/drivers/staging/android/sync.c
+++ b/drivers/staging/android/sync.c
@@ -92,6 +92,10 @@
void sync_timeline_destroy(struct sync_timeline *obj)
{
obj->destroyed = true;
+ /*
+ * Ensure timeline is marked as destroyed before
+ * changing timeline's fences status.
+ */
smp_wmb();
/*