change the locking order for namespace_sem