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

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>
This commit is contained in:
Nicholas Mc Guire 2015-01-17 05:05:34 +01:00 committed by Ingo Molnar
parent 51587bcf31
commit de30ec4730
1 changed files with 1 additions and 8 deletions

View File

@ -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);