Commit 68c9cf36 by Dwight Engen Committed by Serge Hallyn

add process_lock()/unlock() in save_config()

This is likely unnecessary, but is consistent with other uses of fopen()/fclose() in lxc. Signed-off-by: 's avatarDwight Engen <dwight.engen@oracle.com> Acked-by: 's avatarS.Çağlar Onur <caglar@10ur.org> Signed-off-by: 's avatarSerge Hallyn <serge.hallyn@ubuntu.com>
parent 6c6892b5
...@@ -1700,11 +1700,15 @@ static bool lxcapi_save_config(struct lxc_container *c, const char *alt_file) ...@@ -1700,11 +1700,15 @@ static bool lxcapi_save_config(struct lxc_container *c, const char *alt_file)
if (lret) if (lret)
return false; return false;
process_lock();
fout = fopen(alt_file, "w"); fout = fopen(alt_file, "w");
process_unlock();
if (!fout) if (!fout)
goto out; goto out;
write_config(fout, c->lxc_conf); write_config(fout, c->lxc_conf);
process_lock();
fclose(fout); fclose(fout);
process_unlock();
ret = true; ret = true;
out: 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