staging: android: describe use of memory barrier on sync.c
authorNiv Yehezkel <executerx@gmail.com>
Sat, 24 May 2014 14:28:07 +0000 (10:28 -0400)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Sun, 25 May 2014 18:09:14 +0000 (11:09 -0700)
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>
drivers/staging/android/sync.c

index 1f88c5d0f0c7a8d8aecb1762a906adb070a6b87f..18174f7c871c46f0e31fd8e41f235c036323fc67 100644 (file)
@@ -92,6 +92,10 @@ static void sync_timeline_free(struct kref *kref)
 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();
 
        /*