From ad9c8b073631eca7b54fae09aeb108fc935f30da Mon Sep 17 00:00:00 2001 From: Patrick Donnelly Date: Fri, 19 Apr 2024 19:29:44 -0400 Subject: [PATCH] squid: mds: add missing policylock to test F_QUIESCE_BLOCK In order to check an inode's F_QUIESCE_BLOCK, the quiesce_inode op must acquire the policylock. Furthermore, to ensure the F_QUIESCE_BLOCK is not changed during quiesce, the lock must be held for the duration of the op's lifetime. Fixes: https://tracker.ceph.com/issues/65595 Signed-off-by: Patrick Donnelly (cherry picked from commit 50613b5562469ad24ed0fc547cafcfdeef5be604) Fixes: https://tracker.ceph.com/issues/65740 --- src/mds/MDCache.cc | 1 + 1 file changed, 1 insertion(+) diff --git a/src/mds/MDCache.cc b/src/mds/MDCache.cc index 703962fcb7b..29af7fbc270 100644 --- a/src/mds/MDCache.cc +++ b/src/mds/MDCache.cc @@ -13655,6 +13655,7 @@ void MDCache::dispatch_quiesce_inode(const MDRequestRef& mdr) MutationImpl::LockOpVec lov; lov.add_xlock(&in->quiescelock); /* !! */ + lov.add_rdlock(&in->policylock); /* for F_QUIESCE_BLOCK test */ if (in->is_auth()) { if (splitauth) { -- 2.39.5