]> git.proxmox.com Git - ceph.git/blobdiff - ceph/src/client/Delegation.cc
update source to Ceph Pacific 16.2.2
[ceph.git] / ceph / src / client / Delegation.cc
index 52339c5d816065f8cbafaaa72f7a61a9f11c6b1e..0c0ac1b359f19302cf332d877e9d98c69bc7f14c 100644 (file)
@@ -16,9 +16,6 @@ public:
     Inode *in = deleg->get_fh()->inode.get();
     Client *client = in->client;
 
-    // Called back via Timer, which takes client_lock for us
-    ceph_assert(ceph_mutex_is_locked_by_me(client->client_lock));
-
     lsubdout(client->cct, client, 0) << __func__ <<
          ": delegation return timeout for inode 0x" <<
          std::hex << in->ino << ". Forcibly unmounting client. "<<
@@ -100,6 +97,7 @@ void Delegation::arm_timeout()
 {
   Client *client = fh->inode.get()->client;
 
+  std::scoped_lock l(client->timer_lock);
   if (timeout_event)
     return;
 
@@ -111,6 +109,7 @@ void Delegation::disarm_timeout()
 {
   Client *client = fh->inode.get()->client;
 
+  std::scoped_lock l(client->timer_lock);
   if (!timeout_event)
     return;