Yes. And no other work (except a barrier) can run before the caller of
wait_on_work() is woken.
Aha, now I see where I was confused. Yes, we can't avoid the false positives
with flush_workqueue().
I hope this won't be a problem, because almost every usage of flush_workqueue()
is pointless nowadays. So even if we have a false positive, it probably
means the code needs cleanups anyway.
But see below,
If you are going to do this, may I suggest you to make 2 separate patches?
Exactly because we can't avoid the false positives with flush_workqueue(),
it would be nice if we have an option to revert the 2-nd patch if there are
too many false positives (I hope this won't happen).
(please ignore if this is not suitable for you).
Ingo, could you also explain the meaning of "nested" parameter? Looks
like it is just unneeded, lock_release_nested() does a quick check
and use lock_release_non_nested() when hlock is not on top of stack.
Oleg.
-