]> git.apps.os.sepia.ceph.com Git - ceph-ci.git/commitdiff
squid: mds: don't clear `AUTHPIN_FROZEN` until `FROZEN` in rename_prep
authorLeonid Usov <leonid.usov@ibm.com>
Sun, 12 May 2024 00:36:32 +0000 (03:36 +0300)
committerLeonid Usov <leonid.usov@ibm.com>
Tue, 28 May 2024 16:06:19 +0000 (19:06 +0300)
Signed-off-by: Leonid Usov <leonid.usov@ibm.com>
(cherry picked from commit 86d6533351606a86978e117f127d29d63ea588ce)
Fixes: https://tracker.ceph.com/issues/66154
src/mds/Server.cc

index 4f0b9940ed5e0d94aff4b336aaaebe7756bc46bd..8aab21df7ecfdb30ff6d23e6400a0c0d3922e944 100644 (file)
@@ -9980,15 +9980,15 @@ void Server::handle_peer_rename_prep(const MDRequestRef& mdr)
       dout(10) << " freezing srci " << *srcdnl->get_inode() << " with allowance " << allowance << dendl;
       bool frozen_inode = srcdnl->get_inode()->freeze_inode(allowance);
 
-      // unfreeze auth pin after freezing the inode to avoid queueing waiters
-      if (srcdnl->get_inode()->is_frozen_auth_pin())
-       mdr->unfreeze_auth_pin();
-
       if (!frozen_inode) {
-       srcdnl->get_inode()->add_waiter(CInode::WAIT_FROZEN, new C_MDS_RetryRequest(mdcache, mdr));
-       return;
+        srcdnl->get_inode()->add_waiter(CInode::WAIT_FROZEN, new C_MDS_RetryRequest(mdcache, mdr));
+        return;
       }
 
+      // unfreeze auth pin after freezing the inode to avoid queueing waiters
+      if (srcdnl->get_inode()->is_frozen_auth_pin())
+        mdr->unfreeze_auth_pin();
+
       /*
        * set ambiguous auth for srci
        * NOTE: we don't worry about ambiguous cache expire as we do