提交 de30ec47 编写于 作者: N Nicholas Mc Guire 提交者: Ingo Molnar

sched/completion: Remove unnecessary ->wait.lock serialization when reading completion state

Signed-off-by: NNicholas Mc Guire <der.herr@hofr.at>
Signed-off-by: NPeter 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.atSigned-off-by: NIngo Molnar <mingo@kernel.org>
上级 51587bcf
......@@ -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);
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册