projects
/
GitHub
/
moto-9609
/
android_kernel_motorola_exynos9610.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
51587bc
)
sched/completion: Remove unnecessary ->wait.lock serialization when reading completio...
author
Nicholas Mc Guire
<der.herr@hofr.at>
Sat, 17 Jan 2015 04:05:34 +0000
(
05:05
+0100)
committer
Ingo Molnar
<mingo@kernel.org>
Wed, 4 Feb 2015 06:57:36 +0000
(07:57 +0100)
Signed-off-by: Nicholas Mc Guire <der.herr@hofr.at>
Signed-off-by: Peter Zijlstra (Intel) <peterz@infradead.org>
Cc: Linus Torvalds <torvalds@linux-foundation.org>
Link:
http://lkml.kernel.org/r/1421467534-22834-1-git-send-email-der.herr@hofr.at
Signed-off-by: Ingo Molnar <mingo@kernel.org>
kernel/sched/completion.c
patch
|
blob
|
blame
|
history
diff --git
a/kernel/sched/completion.c
b/kernel/sched/completion.c
index 607f852b4d04ab3b70379bf42528aa40e5f588c7..9d1fe32da232a098934d5a19e5dd3d71290bc6db 100644
(file)
--- a/
kernel/sched/completion.c
+++ b/
kernel/sched/completion.c
@@
-288,13
+288,6
@@
EXPORT_SYMBOL(try_wait_for_completion);
*/
bool completion_done(struct completion *x)
{
- unsigned long flags;
- int ret = 1;
-
- spin_lock_irqsave(&x->wait.lock, flags);
- if (!x->done)
- ret = 0;
- spin_unlock_irqrestore(&x->wait.lock, flags);
- return ret;
+ return !!ACCESS_ONCE(x->done);
}
EXPORT_SYMBOL(completion_done);