aboutsummaryrefslogtreecommitdiffstats
path: root/fs/select.c
diff options
context:
space:
mode:
authorPeter Zijlstra <peterz@infradead.org>2015-05-12 04:51:55 -0400
committerIngo Molnar <mingo@kernel.org>2015-05-19 02:32:00 -0400
commitb92b8b35a2e38bde319fd1d68ec84628c1f1b0fb (patch)
tree45aea6d12a580b60848363c10dc355f3307ec1ff /fs/select.c
parentab3f02fc237211f0583c1e7ba3bf504747be9b8d (diff)
locking/arch: Rename set_mb() to smp_store_mb()
Since set_mb() is really about an smp_mb() -- not a IO/DMA barrier like mb() rename it to match the recent smp_load_acquire() and smp_store_release(). Suggested-by: Linus Torvalds <torvalds@linux-foundation.org> Signed-off-by: Peter Zijlstra (Intel) <peterz@infradead.org> Cc: Peter Zijlstra <peterz@infradead.org> Cc: Thomas Gleixner <tglx@linutronix.de> Cc: linux-kernel@vger.kernel.org Signed-off-by: Ingo Molnar <mingo@kernel.org>
Diffstat (limited to 'fs/select.c')
-rw-r--r--fs/select.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/fs/select.c b/fs/select.c
index f684c750e08a..015547330e88 100644
--- a/fs/select.c
+++ b/fs/select.c
@@ -189,7 +189,7 @@ static int __pollwake(wait_queue_t *wait, unsigned mode, int sync, void *key)
189 * doesn't imply write barrier and the users expect write 189 * doesn't imply write barrier and the users expect write
190 * barrier semantics on wakeup functions. The following 190 * barrier semantics on wakeup functions. The following
191 * smp_wmb() is equivalent to smp_wmb() in try_to_wake_up() 191 * smp_wmb() is equivalent to smp_wmb() in try_to_wake_up()
192 * and is paired with set_mb() in poll_schedule_timeout. 192 * and is paired with smp_store_mb() in poll_schedule_timeout.
193 */ 193 */
194 smp_wmb(); 194 smp_wmb();
195 pwq->triggered = 1; 195 pwq->triggered = 1;
@@ -244,7 +244,7 @@ int poll_schedule_timeout(struct poll_wqueues *pwq, int state,
244 /* 244 /*
245 * Prepare for the next iteration. 245 * Prepare for the next iteration.
246 * 246 *
247 * The following set_mb() serves two purposes. First, it's 247 * The following smp_store_mb() serves two purposes. First, it's
248 * the counterpart rmb of the wmb in pollwake() such that data 248 * the counterpart rmb of the wmb in pollwake() such that data
249 * written before wake up is always visible after wake up. 249 * written before wake up is always visible after wake up.
250 * Second, the full barrier guarantees that triggered clearing 250 * Second, the full barrier guarantees that triggered clearing
@@ -252,7 +252,7 @@ int poll_schedule_timeout(struct poll_wqueues *pwq, int state,
252 * this problem doesn't exist for the first iteration as 252 * this problem doesn't exist for the first iteration as
253 * add_wait_queue() has full barrier semantics. 253 * add_wait_queue() has full barrier semantics.
254 */ 254 */
255 set_mb(pwq->triggered, 0); 255 smp_store_mb(pwq->triggered, 0);
256 256
257 return rc; 257 return rc;
258} 258}