]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
mds: add missing policylock to test F_QUIESCE_BLOCK
authorPatrick Donnelly <pdonnell@redhat.com>
Fri, 19 Apr 2024 23:29:44 +0000 (19:29 -0400)
committerPatrick Donnelly <pdonnell@redhat.com>
Fri, 19 Apr 2024 23:29:44 +0000 (19:29 -0400)
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 <pdonnell@redhat.com>
src/mds/MDCache.cc

index f65f81d217e1d6ded054589f803d66edf6d4e11e..607a251ff9d9107158c596b5c0c6f3f1849b345e 100644 (file)
@@ -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) {