From 50613b5562469ad24ed0fc547cafcfdeef5be604 Mon Sep 17 00:00:00 2001 From: Patrick Donnelly Date: Fri, 19 Apr 2024 19:29:44 -0400 Subject: [PATCH] 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 --- src/mds/MDCache.cc | 1 + 1 file changed, 1 insertion(+) diff --git a/src/mds/MDCache.cc b/src/mds/MDCache.cc index f65f81d217e1d..607a251ff9d91 100644 --- a/src/mds/MDCache.cc +++ b/src/mds/MDCache.cc @@ -13625,6 +13625,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