/* initialise the lock manager thread if it isn't already running  */
static int afs_init_lock_manager(void)
/* initialise the lock manager thread if it isn't already running  */
static int afs_init_lock_manager(void)
{
	int ret;
	ret = 0;
	if (!afs_lock_manager) {
		mutex_lock(&afs_lock_manager_mutex);
		if (!afs_lock_manager) {
			afs_lock_manager =
				create_singlethread_workqueue("kafs_lockd");
			if (!afs_lock_manager)
				ret = -ENOMEM;
		}
		mutex_unlock(&afs_lock_manager_mutex);
	}
	return ret;
}