From: Patrick Donnelly Date: Fri, 19 Apr 2024 23:29:44 +0000 (-0400) Subject: mds: add missing policylock to test F_QUIESCE_BLOCK X-Git-Tag: v20.0.0~2109^2~1 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=50613b5562469ad24ed0fc547cafcfdeef5be604;p=ceph.git 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 --- 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) {