[PATCH] use smp_mb/wmb/rmb where possible
[linux-3.10.git] / lib / rwsem.c
index 7644089ec8fa00e7cb58e2a2adaa5ce567ce2b3b..62fa4eba9ffeb3066b385def40c853c4ff05a37f 100644 (file)
@@ -74,7 +74,7 @@ __rwsem_do_wake(struct rw_semaphore *sem, int downgrading)
         */
        list_del(&waiter->list);
        tsk = waiter->task;
-       mb();
+       smp_mb();
        waiter->task = NULL;
        wake_up_process(tsk);
        put_task_struct(tsk);
@@ -117,7 +117,7 @@ __rwsem_do_wake(struct rw_semaphore *sem, int downgrading)
                waiter = list_entry(next, struct rwsem_waiter, list);
                next = waiter->list.next;
                tsk = waiter->task;
-               mb();
+               smp_mb();
                waiter->task = NULL;
                wake_up_process(tsk);
                put_task_struct(tsk);