Skip to content
Commit 3dd2ee48 authored by Linus Torvalds's avatar Linus Torvalds
Browse files

bit_spinlock: don't play preemption games inside the busy loop



When we are waiting for the bit-lock to be released, and are looping
over the 'cpu_relax()' should not be doing anything else - otherwise we
miss the point of trying to do the whole 'cpu_relax()'.

Do the preemption enable/disable around the loop, rather than inside of
it.

Noticed when I was looking at the code generation for the dcache
__d_drop usage, and the code just looked very odd.

Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
parent 5dd12af0
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment