]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commitdiff
libcephfs: fix calling init() then mount() 5964/head
authorJohn Spray <john.spray@redhat.com>
Thu, 17 Sep 2015 12:46:30 +0000 (13:46 +0100)
committerJohn Spray <john.spray@redhat.com>
Thu, 17 Sep 2015 12:47:58 +0000 (13:47 +0100)
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 <john.spray@redhat.com>
src/libcephfs.cc

index 13d85c7e2814d880cf0d4a16df93a3178ebc10d3..403d0dc11f1276028c99c0da57ae697a60a97b96 100644 (file)
@@ -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);