This addresses the first two issues. The third problem is actually caught when the flush ever does anything, but that might be rare depending on the circumstances, so I still think it'd be nice to catch it somehow, but right now I don't have the time to look into it. johannes v2: * move the acquire/release into flush_work() where it used to be * also re-add the acquire/release into flush_workqueue()