diff options
author | akpm@osdl.org <akpm@osdl.org> | 2005-05-01 08:58:47 -0700 |
---|---|---|
committer | Linus Torvalds <torvalds@ppc970.osdl.org> | 2005-05-01 08:58:47 -0700 |
commit | d59dd4620fb8d6422555a9e2b82a707718e68327 (patch) | |
tree | 78205657d24efcaa3f8314064951ac3814ed95a7 /lib/rwsem.c | |
parent | 0d8d4d42f2d00eb65262b49f4edd4cf7ef4eb6fc (diff) |
[PATCH] use smp_mb/wmb/rmb where possible
Replace a number of memory barriers with smp_ variants. This means we won't
take the unnecessary hit on UP machines.
Signed-off-by: Anton Blanchard <anton@samba.org>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Diffstat (limited to 'lib/rwsem.c')
-rw-r--r-- | lib/rwsem.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/rwsem.c b/lib/rwsem.c index 7644089ec8f..62fa4eba9ff 100644 --- a/lib/rwsem.c +++ b/lib/rwsem.c @@ -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); |