From 6a24d3198a5df10fd223996d53d19e063576f9b4 Mon Sep 17 00:00:00 2001 From: John Spray Date: Thu, 17 Sep 2015 13:46:30 +0100 Subject: [PATCH] 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 --- src/libcephfs.cc | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/src/libcephfs.cc b/src/libcephfs.cc index 13d85c7e2814d..403d0dc11f127 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); -- 2.39.5