Commit 5790f7b7 by Serge Hallyn

api_clone: call is_stopped_locked() to avoid deadlock.

Technically as Dwight has mentioned we should probably drop the locking from api_state() altogether, since those are protected through the lxc command system. Signed-off-by: 's avatarSerge Hallyn <serge.hallyn@ubuntu.com>
parent 64f782ca
...@@ -1827,7 +1827,7 @@ struct lxc_container *lxcapi_clone(struct lxc_container *c, const char *newname, ...@@ -1827,7 +1827,7 @@ struct lxc_container *lxcapi_clone(struct lxc_container *c, const char *newname,
if (container_mem_lock(c)) if (container_mem_lock(c))
return NULL; return NULL;
if (c->is_running(c)) { if (!is_stopped_locked(c)) {
ERROR("error: Original container (%s) is running", c->name); ERROR("error: Original container (%s) is running", c->name);
goto out; goto out;
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment