]> git.apps.os.sepia.ceph.com Git - ceph-ci.git/commitdiff
mds: simplify assert
authorPatrick Donnelly <pdonnell@redhat.com>
Thu, 4 Jan 2024 17:24:29 +0000 (12:24 -0500)
committerPatrick Donnelly <pdonnell@redhat.com>
Fri, 22 Mar 2024 15:38:02 +0000 (11:38 -0400)
Signed-off-by: Patrick Donnelly <pdonnell@redhat.com>
(cherry picked from commit 180979d7014a6c3799bb7282d90d6e6af860978a)

src/mds/Locker.cc

index 017cb74555df9482af61dc540dfef419491eb278..782b3422d2086dea9757689a23c63b1fa5becc32 100644 (file)
@@ -149,8 +149,7 @@ bool Locker::try_rdlock_snap_layout(CInode *in, const MDRequestRef& mdr,
   bool found_locked = false;
   bool found_layout = false;
 
-  if (want_layout)
-    ceph_assert(n == 0);
+  ceph_assert(!want_layout || n == 0);
 
   client_t client = mdr->get_client();