]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commitdiff
client: reset unmounting flag to false when starting a new mount 17875/head
authorJeff Layton <jlayton@redhat.com>
Fri, 25 Aug 2017 12:31:47 +0000 (08:31 -0400)
committerNathan Cutler <ncutler@suse.com>
Sun, 28 Jan 2018 21:32:14 +0000 (22:32 +0100)
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 <jlayton@redhat.com>
(cherry picked from commit 3bc61f6c23a9ada5e2250f66e4df04a66dcfbacf)

src/client/Client.cc

index 60f3411370ecc05d09a3f0ec1e397b92909dbfed..3595a32f35f3cd2415b8e8df59376e0bdccadc00 100644 (file)
@@ -5691,6 +5691,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;