]> git.apps.os.sepia.ceph.com Git - ceph-ci.git/commitdiff
mds: remove wrong assertion in Locker::snapflush_nudge
authorYan, Zheng <zyan@redhat.com>
Wed, 2 Jan 2019 07:48:04 +0000 (15:48 +0800)
committerYan, Zheng <zyan@redhat.com>
Wed, 2 Jan 2019 08:30:49 +0000 (16:30 +0800)
head inode gets unpinned when snapflush starts. It might get trimmed
before snapflush finishes.

Fixes: http://tracker.ceph.com/issues/37721
Signed-off-by: "Yan, Zheng" <zyan@redhat.com>
src/mds/Locker.cc

index e103a5ee029e36bcd405726380cb0e94aeedf688..3356a86a39c0ccfa23b2dded004323dd48e08169 100644 (file)
@@ -2561,7 +2561,11 @@ void Locker::snapflush_nudge(CInode *in)
     return;
 
   CInode *head = mdcache->get_inode(in->ino());
-  ceph_assert(head);
+  // head inode gets unpinned when snapflush starts. It might get trimmed
+  // before snapflush finishes.
+  if (!head)
+    return;
+
   ceph_assert(head->is_auth());
   if (head->client_need_snapflush.empty())
     return;