summaryrefslogtreecommitdiffstats
path: root/drivers/leds/leds-da9052.c
diff options
context:
space:
mode:
authorPeter Zijlstra <peterz@infradead.org>2021-06-30 17:35:18 +0200
committerPeter Zijlstra <peterz@infradead.org>2021-07-07 13:53:24 +0200
commit048661a1f963e9517630f080687d48af79ed784c (patch)
treeb5850f9221b6f8ff66f79b19645c82a2f02d1124 /drivers/leds/leds-da9052.c
parentab4e4d9f79b2c95ef268985d2a9625a03a73c49a (diff)
downloadlinux-stable-048661a1f963e9517630f080687d48af79ed784c.tar.gz
linux-stable-048661a1f963e9517630f080687d48af79ed784c.tar.bz2
linux-stable-048661a1f963e9517630f080687d48af79ed784c.zip
locking/mutex: Fix HANDOFF condition
Yanfei reported that setting HANDOFF should not depend on recomputing @first, only on @first state. Which would then give: if (ww_ctx || !first) first = __mutex_waiter_is_first(lock, &waiter); if (first) __mutex_set_flag(lock, MUTEX_FLAG_HANDOFF); But because 'ww_ctx || !first' is basically 'always' and the test for first is relatively cheap, omit that first branch entirely. Reported-by: Yanfei Xu <yanfei.xu@windriver.com> Signed-off-by: Peter Zijlstra (Intel) <peterz@infradead.org> Reviewed-by: Waiman Long <longman@redhat.com> Reviewed-by: Yanfei Xu <yanfei.xu@windriver.com> Link: https://lore.kernel.org/r/20210630154114.896786297@infradead.org
Diffstat (limited to 'drivers/leds/leds-da9052.c')
0 files changed, 0 insertions, 0 deletions