Ejemplo n.º 1
0
static int _lock_resource(struct cmd_context *cmd, const char *resource,
			  uint32_t flags)
{
	if (_lock_fn)
		return _lock_fn(cmd, resource, flags);
	else
		return 0;
}
Ejemplo n.º 2
0
static int _lock_resource(struct cmd_context *cmd, const char *resource,
			  uint32_t flags)
{
	if (!_lock_fn)
		return 0;

	if (!strcmp(resource, VG_SYNC_NAMES)) {
		/* Hide this lock request from external locking */
		fs_unlock();
		return 1;
	}

	return _lock_fn(cmd, resource, flags);
}