diff options
-rw-r--r-- | fs/buffer.c | 6 | ||||
-rw-r--r-- | ipc/mqueue.c | 4 | ||||
-rw-r--r-- | kernel/kthread.c | 2 | ||||
-rw-r--r-- | kernel/profile.c | 2 | ||||
-rw-r--r-- | kernel/ptrace.c | 2 | ||||
-rw-r--r-- | kernel/stop_machine.c | 10 | ||||
-rw-r--r-- | kernel/sys.c | 20 | ||||
-rw-r--r-- | kernel/timer.c | 2 | ||||
-rw-r--r-- | lib/rwsem-spinlock.c | 6 | ||||
-rw-r--r-- | lib/rwsem.c | 4 | ||||
-rw-r--r-- | mm/mempool.c | 4 |
11 files changed, 31 insertions, 31 deletions
diff --git a/fs/buffer.c b/fs/buffer.c index 665db84a1f9f..188365c79204 100644 --- a/fs/buffer.c +++ b/fs/buffer.c | |||
@@ -218,7 +218,7 @@ struct super_block *freeze_bdev(struct block_device *bdev) | |||
218 | sb = get_super(bdev); | 218 | sb = get_super(bdev); |
219 | if (sb && !(sb->s_flags & MS_RDONLY)) { | 219 | if (sb && !(sb->s_flags & MS_RDONLY)) { |
220 | sb->s_frozen = SB_FREEZE_WRITE; | 220 | sb->s_frozen = SB_FREEZE_WRITE; |
221 | wmb(); | 221 | smp_wmb(); |
222 | 222 | ||
223 | sync_inodes_sb(sb, 0); | 223 | sync_inodes_sb(sb, 0); |
224 | DQUOT_SYNC(sb); | 224 | DQUOT_SYNC(sb); |
@@ -235,7 +235,7 @@ struct super_block *freeze_bdev(struct block_device *bdev) | |||
235 | sync_inodes_sb(sb, 1); | 235 | sync_inodes_sb(sb, 1); |
236 | 236 | ||
237 | sb->s_frozen = SB_FREEZE_TRANS; | 237 | sb->s_frozen = SB_FREEZE_TRANS; |
238 | wmb(); | 238 | smp_wmb(); |
239 | 239 | ||
240 | sync_blockdev(sb->s_bdev); | 240 | sync_blockdev(sb->s_bdev); |
241 | 241 | ||
@@ -263,7 +263,7 @@ void thaw_bdev(struct block_device *bdev, struct super_block *sb) | |||
263 | if (sb->s_op->unlockfs) | 263 | if (sb->s_op->unlockfs) |
264 | sb->s_op->unlockfs(sb); | 264 | sb->s_op->unlockfs(sb); |
265 | sb->s_frozen = SB_UNFROZEN; | 265 | sb->s_frozen = SB_UNFROZEN; |
266 | wmb(); | 266 | smp_wmb(); |
267 | wake_up(&sb->s_wait_unfrozen); | 267 | wake_up(&sb->s_wait_unfrozen); |
268 | drop_super(sb); | 268 | drop_super(sb); |
269 | } | 269 | } |
diff --git a/ipc/mqueue.c b/ipc/mqueue.c index cb0cd3cf3b5a..33f71520b89c 100644 --- a/ipc/mqueue.c +++ b/ipc/mqueue.c | |||
@@ -767,7 +767,7 @@ static inline void pipelined_send(struct mqueue_inode_info *info, | |||
767 | list_del(&receiver->list); | 767 | list_del(&receiver->list); |
768 | receiver->state = STATE_PENDING; | 768 | receiver->state = STATE_PENDING; |
769 | wake_up_process(receiver->task); | 769 | wake_up_process(receiver->task); |
770 | wmb(); | 770 | smp_wmb(); |
771 | receiver->state = STATE_READY; | 771 | receiver->state = STATE_READY; |
772 | } | 772 | } |
773 | 773 | ||
@@ -786,7 +786,7 @@ static inline void pipelined_receive(struct mqueue_inode_info *info) | |||
786 | list_del(&sender->list); | 786 | list_del(&sender->list); |
787 | sender->state = STATE_PENDING; | 787 | sender->state = STATE_PENDING; |
788 | wake_up_process(sender->task); | 788 | wake_up_process(sender->task); |
789 | wmb(); | 789 | smp_wmb(); |
790 | sender->state = STATE_READY; | 790 | sender->state = STATE_READY; |
791 | } | 791 | } |
792 | 792 | ||
diff --git a/kernel/kthread.c b/kernel/kthread.c index e377e2244103..f50f174e92da 100644 --- a/kernel/kthread.c +++ b/kernel/kthread.c | |||
@@ -174,7 +174,7 @@ int kthread_stop(struct task_struct *k) | |||
174 | 174 | ||
175 | /* Must init completion *before* thread sees kthread_stop_info.k */ | 175 | /* Must init completion *before* thread sees kthread_stop_info.k */ |
176 | init_completion(&kthread_stop_info.done); | 176 | init_completion(&kthread_stop_info.done); |
177 | wmb(); | 177 | smp_wmb(); |
178 | 178 | ||
179 | /* Now set kthread_should_stop() to true, and wake it up. */ | 179 | /* Now set kthread_should_stop() to true, and wake it up. */ |
180 | kthread_stop_info.k = k; | 180 | kthread_stop_info.k = k; |
diff --git a/kernel/profile.c b/kernel/profile.c index a38fa70075fe..a66be468c422 100644 --- a/kernel/profile.c +++ b/kernel/profile.c | |||
@@ -522,7 +522,7 @@ static int __init create_hash_tables(void) | |||
522 | return 0; | 522 | return 0; |
523 | out_cleanup: | 523 | out_cleanup: |
524 | prof_on = 0; | 524 | prof_on = 0; |
525 | mb(); | 525 | smp_mb(); |
526 | on_each_cpu(profile_nop, NULL, 0, 1); | 526 | on_each_cpu(profile_nop, NULL, 0, 1); |
527 | for_each_online_cpu(cpu) { | 527 | for_each_online_cpu(cpu) { |
528 | struct page *page; | 528 | struct page *page; |
diff --git a/kernel/ptrace.c b/kernel/ptrace.c index 88b306c4e841..f5cc1cec0fb4 100644 --- a/kernel/ptrace.c +++ b/kernel/ptrace.c | |||
@@ -135,7 +135,7 @@ int ptrace_attach(struct task_struct *task) | |||
135 | (current->gid != task->sgid) || | 135 | (current->gid != task->sgid) || |
136 | (current->gid != task->gid)) && !capable(CAP_SYS_PTRACE)) | 136 | (current->gid != task->gid)) && !capable(CAP_SYS_PTRACE)) |
137 | goto bad; | 137 | goto bad; |
138 | rmb(); | 138 | smp_rmb(); |
139 | if (!task->mm->dumpable && !capable(CAP_SYS_PTRACE)) | 139 | if (!task->mm->dumpable && !capable(CAP_SYS_PTRACE)) |
140 | goto bad; | 140 | goto bad; |
141 | /* the same process cannot be attached many times */ | 141 | /* the same process cannot be attached many times */ |
diff --git a/kernel/stop_machine.c b/kernel/stop_machine.c index c39ed70af174..6116b25aa7cf 100644 --- a/kernel/stop_machine.c +++ b/kernel/stop_machine.c | |||
@@ -33,7 +33,7 @@ static int stopmachine(void *cpu) | |||
33 | set_cpus_allowed(current, cpumask_of_cpu((int)(long)cpu)); | 33 | set_cpus_allowed(current, cpumask_of_cpu((int)(long)cpu)); |
34 | 34 | ||
35 | /* Ack: we are alive */ | 35 | /* Ack: we are alive */ |
36 | mb(); /* Theoretically the ack = 0 might not be on this CPU yet. */ | 36 | smp_mb(); /* Theoretically the ack = 0 might not be on this CPU yet. */ |
37 | atomic_inc(&stopmachine_thread_ack); | 37 | atomic_inc(&stopmachine_thread_ack); |
38 | 38 | ||
39 | /* Simple state machine */ | 39 | /* Simple state machine */ |
@@ -43,14 +43,14 @@ static int stopmachine(void *cpu) | |||
43 | local_irq_disable(); | 43 | local_irq_disable(); |
44 | irqs_disabled = 1; | 44 | irqs_disabled = 1; |
45 | /* Ack: irqs disabled. */ | 45 | /* Ack: irqs disabled. */ |
46 | mb(); /* Must read state first. */ | 46 | smp_mb(); /* Must read state first. */ |
47 | atomic_inc(&stopmachine_thread_ack); | 47 | atomic_inc(&stopmachine_thread_ack); |
48 | } else if (stopmachine_state == STOPMACHINE_PREPARE | 48 | } else if (stopmachine_state == STOPMACHINE_PREPARE |
49 | && !prepared) { | 49 | && !prepared) { |
50 | /* Everyone is in place, hold CPU. */ | 50 | /* Everyone is in place, hold CPU. */ |
51 | preempt_disable(); | 51 | preempt_disable(); |
52 | prepared = 1; | 52 | prepared = 1; |
53 | mb(); /* Must read state first. */ | 53 | smp_mb(); /* Must read state first. */ |
54 | atomic_inc(&stopmachine_thread_ack); | 54 | atomic_inc(&stopmachine_thread_ack); |
55 | } | 55 | } |
56 | /* Yield in first stage: migration threads need to | 56 | /* Yield in first stage: migration threads need to |
@@ -62,7 +62,7 @@ static int stopmachine(void *cpu) | |||
62 | } | 62 | } |
63 | 63 | ||
64 | /* Ack: we are exiting. */ | 64 | /* Ack: we are exiting. */ |
65 | mb(); /* Must read state first. */ | 65 | smp_mb(); /* Must read state first. */ |
66 | atomic_inc(&stopmachine_thread_ack); | 66 | atomic_inc(&stopmachine_thread_ack); |
67 | 67 | ||
68 | if (irqs_disabled) | 68 | if (irqs_disabled) |
@@ -77,7 +77,7 @@ static int stopmachine(void *cpu) | |||
77 | static void stopmachine_set_state(enum stopmachine_state state) | 77 | static void stopmachine_set_state(enum stopmachine_state state) |
78 | { | 78 | { |
79 | atomic_set(&stopmachine_thread_ack, 0); | 79 | atomic_set(&stopmachine_thread_ack, 0); |
80 | wmb(); | 80 | smp_wmb(); |
81 | stopmachine_state = state; | 81 | stopmachine_state = state; |
82 | while (atomic_read(&stopmachine_thread_ack) != stopmachine_num_threads) | 82 | while (atomic_read(&stopmachine_thread_ack) != stopmachine_num_threads) |
83 | cpu_relax(); | 83 | cpu_relax(); |
diff --git a/kernel/sys.c b/kernel/sys.c index 462d78d55895..df2ddcc6863b 100644 --- a/kernel/sys.c +++ b/kernel/sys.c | |||
@@ -525,7 +525,7 @@ asmlinkage long sys_setregid(gid_t rgid, gid_t egid) | |||
525 | if (new_egid != old_egid) | 525 | if (new_egid != old_egid) |
526 | { | 526 | { |
527 | current->mm->dumpable = 0; | 527 | current->mm->dumpable = 0; |
528 | wmb(); | 528 | smp_wmb(); |
529 | } | 529 | } |
530 | if (rgid != (gid_t) -1 || | 530 | if (rgid != (gid_t) -1 || |
531 | (egid != (gid_t) -1 && egid != old_rgid)) | 531 | (egid != (gid_t) -1 && egid != old_rgid)) |
@@ -556,7 +556,7 @@ asmlinkage long sys_setgid(gid_t gid) | |||
556 | if(old_egid != gid) | 556 | if(old_egid != gid) |
557 | { | 557 | { |
558 | current->mm->dumpable=0; | 558 | current->mm->dumpable=0; |
559 | wmb(); | 559 | smp_wmb(); |
560 | } | 560 | } |
561 | current->gid = current->egid = current->sgid = current->fsgid = gid; | 561 | current->gid = current->egid = current->sgid = current->fsgid = gid; |
562 | } | 562 | } |
@@ -565,7 +565,7 @@ asmlinkage long sys_setgid(gid_t gid) | |||
565 | if(old_egid != gid) | 565 | if(old_egid != gid) |
566 | { | 566 | { |
567 | current->mm->dumpable=0; | 567 | current->mm->dumpable=0; |
568 | wmb(); | 568 | smp_wmb(); |
569 | } | 569 | } |
570 | current->egid = current->fsgid = gid; | 570 | current->egid = current->fsgid = gid; |
571 | } | 571 | } |
@@ -596,7 +596,7 @@ static int set_user(uid_t new_ruid, int dumpclear) | |||
596 | if(dumpclear) | 596 | if(dumpclear) |
597 | { | 597 | { |
598 | current->mm->dumpable = 0; | 598 | current->mm->dumpable = 0; |
599 | wmb(); | 599 | smp_wmb(); |
600 | } | 600 | } |
601 | current->uid = new_ruid; | 601 | current->uid = new_ruid; |
602 | return 0; | 602 | return 0; |
@@ -653,7 +653,7 @@ asmlinkage long sys_setreuid(uid_t ruid, uid_t euid) | |||
653 | if (new_euid != old_euid) | 653 | if (new_euid != old_euid) |
654 | { | 654 | { |
655 | current->mm->dumpable=0; | 655 | current->mm->dumpable=0; |
656 | wmb(); | 656 | smp_wmb(); |
657 | } | 657 | } |
658 | current->fsuid = current->euid = new_euid; | 658 | current->fsuid = current->euid = new_euid; |
659 | if (ruid != (uid_t) -1 || | 659 | if (ruid != (uid_t) -1 || |
@@ -703,7 +703,7 @@ asmlinkage long sys_setuid(uid_t uid) | |||
703 | if (old_euid != uid) | 703 | if (old_euid != uid) |
704 | { | 704 | { |
705 | current->mm->dumpable = 0; | 705 | current->mm->dumpable = 0; |
706 | wmb(); | 706 | smp_wmb(); |
707 | } | 707 | } |
708 | current->fsuid = current->euid = uid; | 708 | current->fsuid = current->euid = uid; |
709 | current->suid = new_suid; | 709 | current->suid = new_suid; |
@@ -748,7 +748,7 @@ asmlinkage long sys_setresuid(uid_t ruid, uid_t euid, uid_t suid) | |||
748 | if (euid != current->euid) | 748 | if (euid != current->euid) |
749 | { | 749 | { |
750 | current->mm->dumpable = 0; | 750 | current->mm->dumpable = 0; |
751 | wmb(); | 751 | smp_wmb(); |
752 | } | 752 | } |
753 | current->euid = euid; | 753 | current->euid = euid; |
754 | } | 754 | } |
@@ -798,7 +798,7 @@ asmlinkage long sys_setresgid(gid_t rgid, gid_t egid, gid_t sgid) | |||
798 | if (egid != current->egid) | 798 | if (egid != current->egid) |
799 | { | 799 | { |
800 | current->mm->dumpable = 0; | 800 | current->mm->dumpable = 0; |
801 | wmb(); | 801 | smp_wmb(); |
802 | } | 802 | } |
803 | current->egid = egid; | 803 | current->egid = egid; |
804 | } | 804 | } |
@@ -845,7 +845,7 @@ asmlinkage long sys_setfsuid(uid_t uid) | |||
845 | if (uid != old_fsuid) | 845 | if (uid != old_fsuid) |
846 | { | 846 | { |
847 | current->mm->dumpable = 0; | 847 | current->mm->dumpable = 0; |
848 | wmb(); | 848 | smp_wmb(); |
849 | } | 849 | } |
850 | current->fsuid = uid; | 850 | current->fsuid = uid; |
851 | } | 851 | } |
@@ -875,7 +875,7 @@ asmlinkage long sys_setfsgid(gid_t gid) | |||
875 | if (gid != old_fsgid) | 875 | if (gid != old_fsgid) |
876 | { | 876 | { |
877 | current->mm->dumpable = 0; | 877 | current->mm->dumpable = 0; |
878 | wmb(); | 878 | smp_wmb(); |
879 | } | 879 | } |
880 | current->fsgid = gid; | 880 | current->fsgid = gid; |
881 | key_fsgid_changed(current); | 881 | key_fsgid_changed(current); |
diff --git a/kernel/timer.c b/kernel/timer.c index ecb3d67c0e14..207aa4f0aa10 100644 --- a/kernel/timer.c +++ b/kernel/timer.c | |||
@@ -1007,7 +1007,7 @@ asmlinkage long sys_getppid(void) | |||
1007 | * Make sure we read the pid before re-reading the | 1007 | * Make sure we read the pid before re-reading the |
1008 | * parent pointer: | 1008 | * parent pointer: |
1009 | */ | 1009 | */ |
1010 | rmb(); | 1010 | smp_rmb(); |
1011 | parent = me->group_leader->real_parent; | 1011 | parent = me->group_leader->real_parent; |
1012 | if (old != parent) | 1012 | if (old != parent) |
1013 | continue; | 1013 | continue; |
diff --git a/lib/rwsem-spinlock.c b/lib/rwsem-spinlock.c index 21f0db2c9711..40ffde940a86 100644 --- a/lib/rwsem-spinlock.c +++ b/lib/rwsem-spinlock.c | |||
@@ -76,7 +76,7 @@ __rwsem_do_wake(struct rw_semaphore *sem, int wakewrite) | |||
76 | list_del(&waiter->list); | 76 | list_del(&waiter->list); |
77 | tsk = waiter->task; | 77 | tsk = waiter->task; |
78 | /* Don't touch waiter after ->task has been NULLed */ | 78 | /* Don't touch waiter after ->task has been NULLed */ |
79 | mb(); | 79 | smp_mb(); |
80 | waiter->task = NULL; | 80 | waiter->task = NULL; |
81 | wake_up_process(tsk); | 81 | wake_up_process(tsk); |
82 | put_task_struct(tsk); | 82 | put_task_struct(tsk); |
@@ -91,7 +91,7 @@ __rwsem_do_wake(struct rw_semaphore *sem, int wakewrite) | |||
91 | 91 | ||
92 | list_del(&waiter->list); | 92 | list_del(&waiter->list); |
93 | tsk = waiter->task; | 93 | tsk = waiter->task; |
94 | mb(); | 94 | smp_mb(); |
95 | waiter->task = NULL; | 95 | waiter->task = NULL; |
96 | wake_up_process(tsk); | 96 | wake_up_process(tsk); |
97 | put_task_struct(tsk); | 97 | put_task_struct(tsk); |
@@ -123,7 +123,7 @@ __rwsem_wake_one_writer(struct rw_semaphore *sem) | |||
123 | list_del(&waiter->list); | 123 | list_del(&waiter->list); |
124 | 124 | ||
125 | tsk = waiter->task; | 125 | tsk = waiter->task; |
126 | mb(); | 126 | smp_mb(); |
127 | waiter->task = NULL; | 127 | waiter->task = NULL; |
128 | wake_up_process(tsk); | 128 | wake_up_process(tsk); |
129 | put_task_struct(tsk); | 129 | put_task_struct(tsk); |
diff --git a/lib/rwsem.c b/lib/rwsem.c index 7644089ec8fa..62fa4eba9ffe 100644 --- a/lib/rwsem.c +++ b/lib/rwsem.c | |||
@@ -74,7 +74,7 @@ __rwsem_do_wake(struct rw_semaphore *sem, int downgrading) | |||
74 | */ | 74 | */ |
75 | list_del(&waiter->list); | 75 | list_del(&waiter->list); |
76 | tsk = waiter->task; | 76 | tsk = waiter->task; |
77 | mb(); | 77 | smp_mb(); |
78 | waiter->task = NULL; | 78 | waiter->task = NULL; |
79 | wake_up_process(tsk); | 79 | wake_up_process(tsk); |
80 | put_task_struct(tsk); | 80 | put_task_struct(tsk); |
@@ -117,7 +117,7 @@ __rwsem_do_wake(struct rw_semaphore *sem, int downgrading) | |||
117 | waiter = list_entry(next, struct rwsem_waiter, list); | 117 | waiter = list_entry(next, struct rwsem_waiter, list); |
118 | next = waiter->list.next; | 118 | next = waiter->list.next; |
119 | tsk = waiter->task; | 119 | tsk = waiter->task; |
120 | mb(); | 120 | smp_mb(); |
121 | waiter->task = NULL; | 121 | waiter->task = NULL; |
122 | wake_up_process(tsk); | 122 | wake_up_process(tsk); |
123 | put_task_struct(tsk); | 123 | put_task_struct(tsk); |
diff --git a/mm/mempool.c b/mm/mempool.c index e9a0a6337b21..c9f3d4620428 100644 --- a/mm/mempool.c +++ b/mm/mempool.c | |||
@@ -229,7 +229,7 @@ repeat_alloc: | |||
229 | /* Now start performing page reclaim */ | 229 | /* Now start performing page reclaim */ |
230 | gfp_temp = gfp_mask; | 230 | gfp_temp = gfp_mask; |
231 | prepare_to_wait(&pool->wait, &wait, TASK_UNINTERRUPTIBLE); | 231 | prepare_to_wait(&pool->wait, &wait, TASK_UNINTERRUPTIBLE); |
232 | mb(); | 232 | smp_mb(); |
233 | if (!pool->curr_nr) | 233 | if (!pool->curr_nr) |
234 | io_schedule(); | 234 | io_schedule(); |
235 | finish_wait(&pool->wait, &wait); | 235 | finish_wait(&pool->wait, &wait); |
@@ -250,7 +250,7 @@ void mempool_free(void *element, mempool_t *pool) | |||
250 | { | 250 | { |
251 | unsigned long flags; | 251 | unsigned long flags; |
252 | 252 | ||
253 | mb(); | 253 | smp_mb(); |
254 | if (pool->curr_nr < pool->min_nr) { | 254 | if (pool->curr_nr < pool->min_nr) { |
255 | spin_lock_irqsave(&pool->lock, flags); | 255 | spin_lock_irqsave(&pool->lock, flags); |
256 | if (pool->curr_nr < pool->min_nr) { | 256 | if (pool->curr_nr < pool->min_nr) { |