Rémi Bernon (@rbernon) commented about server/mutex.c:
static void mutex_destroy( struct object *obj ) { struct mutex *mutex = (struct mutex *)obj; assert( obj->ops == &mutex_ops );
- if (!mutex->count) return;
- if (mutex->count)
- { mutex->count = 0; do_release( mutex ); }
- if (mutex->inproc_sync)
- {
release_object( mutex->inproc_sync );
list_remove( &mutex->inproc_mutexes_entry );
- }
Related to the other comment, if both cases are exclusive I think it should be more obvious.