From: Jeff Layton Date: Fri, 25 Aug 2017 12:31:47 +0000 (-0400) Subject: client: reset unmounting flag to false when starting a new mount X-Git-Tag: v13.0.1~1041^2 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=3bc61f6c23a9ada5e2250f66e4df04a66dcfbacf;p=ceph.git client: reset unmounting flag to false when starting a new mount Once the "unmounting" flag goes to true, it never flips back to false. We don't have a lot of checks for "unmounting" in the code, but they're in some subtle places today and I plan to add more later. It's not clear to me whether it's possible (or advisable) to reuse a Client that has previously been unmounted. It most certainly won't work as expected today, and the checks I'll be adding will break it for sure. Make sure we clear the unmounting flag when we go to re-mount the Client. Signed-off-by: Jeff Layton --- diff --git a/src/client/Client.cc b/src/client/Client.cc index 183a661a544..5afdb37c11b 100644 --- a/src/client/Client.cc +++ b/src/client/Client.cc @@ -5677,6 +5677,8 @@ int Client::mount(const std::string &mount_root, const UserPerm& perms, return 0; } + unmounting = false; + int r = authenticate(); if (r < 0) { lderr(cct) << "authentication failed: " << cpp_strerror(r) << dendl;