]> git-server-git.apps.pok.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>
Wed, 20 Mar 2024 14:56:52 +0000 (10:56 -0400)
Signed-off-by: Patrick Donnelly <pdonnell@redhat.com>
src/mds/Locker.cc

index a0b818971bbe31e1c5cad2a3d4e73c2ec0292a55..5aed88f6f4b7050c4f0937d3646ef8e5ba29e7e9 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();