From: John Spray Date: Thu, 17 Sep 2015 12:46:30 +0000 (+0100) Subject: libcephfs: fix calling init() then mount() X-Git-Tag: v9.1.0~126^2 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=refs%2Fpull%2F5964%2Fhead;p=ceph.git libcephfs: fix calling init() then mount() Previously only ever called these separately, but it should be allowed for callers to use one after the other. Fixes: #13138 Signed-off-by: John Spray --- diff --git a/src/libcephfs.cc b/src/libcephfs.cc index 13d85c7e2814..403d0dc11f12 100644 --- a/src/libcephfs.cc +++ b/src/libcephfs.cc @@ -108,9 +108,11 @@ public: if (mounted) return -EISCONN; - ret = init(); - if (ret != 0) { - return ret; + if (!inited) { + ret = init(); + if (ret != 0) { + return ret; + } } ret = client->mount(mount_root);