From: Thomas Gleixner Date: Fri, 10 Jun 2011 13:08:55 +0000 (+0200) Subject: sched: Simplify mutex_spin_on_owner() X-Git-Tag: v3.1-rc1~298^2~16 X-Git-Url: http://git.openpandora.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=307bf9803f25a8a3f53c1012110fb74e2f893eb0;p=pandora-kernel.git sched: Simplify mutex_spin_on_owner() It does not make sense to rcu_read_lock/unlock() in every loop iteration while spinning on the mutex. Move the rcu protection outside the loop. Also simplify the return path to always check for lock->owner == NULL which meets the requirements of both owner changed and need_resched() caused loop exits. Signed-off-by: Thomas Gleixner Signed-off-by: Peter Zijlstra Cc: Linus Torvalds Cc: Andrew Morton Link: http://lkml.kernel.org/r/alpine.LFD.2.02.1106101458350.11814@ionos Signed-off-by: Ingo Molnar --- Reading git-diff-tree failed