On Mon, Nov 21, 2016 at 05:52:27PM +0100, Arnd Bergmann wrote: > I think a mutex would't work here, since fops->open() and fops->close() > are not called from the same context and lockdep will complain > about that. > > Version of the series had replaced the semaphore with a completion > here, which worked correctly, but one reviewer suggested using > the wait_event() instead since it's confusing to have a completion > starting out in 'completed' state. On the other hand the existing semaphore works perfectly fine, and is way easier to understand than any of the other models, which also don't provide any benefit at all. Please stop messing with perfectly fine semaphores now - there are plenty that are much better replaced with mutexes or completions, but this (and various others are not). Leave them alone and do something useful instead. -- To unsubscribe from this list: send the line "unsubscribe target-devel" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html