]> git.apps.os.sepia.ceph.com Git - ceph.git/commit
common: make it safe to call env_to_vec multiple times
authorJeff Layton <jlayton@redhat.com>
Wed, 11 Oct 2017 15:16:38 +0000 (11:16 -0400)
committerNathan Cutler <ncutler@suse.com>
Tue, 23 Jan 2018 23:08:56 +0000 (00:08 +0100)
commit8dec6175ab1167bab01af2594ac5d687072f3af2
tree9206323bec0bce30595496d6da1425a45d3222c0
parenteeb62a53c057bdb55e2da014dc7633312ab648b5
common: make it safe to call env_to_vec multiple times

After it has been called once and we have outstanding CephContexts with
pointers into str_vec, we can't call get_str_vec on it again.

Add a static local mutex to protect access to str_vec.

Tracker: http://tracker.ceph.com/issues/21512
Signed-off-by: Jeff Layton <jlayton@redhat.com>
(cherry picked from commit 90e898de5f4b8d22f1a6d0e2aedf9e8c50cf72d5)
src/common/ceph_argparse.cc