]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commitdiff
mds: remove wrong assertion in Locker::snapflush_nudge 25885/head
authorYan, Zheng <zyan@redhat.com>
Wed, 2 Jan 2019 07:48:04 +0000 (15:48 +0800)
committerPrashant D <pdhange@redhat.com>
Thu, 10 Jan 2019 00:02:55 +0000 (19:02 -0500)
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>
(cherry picked from commit 75a872734cbbf2e8e9f24bf2ace3bdbf26bf7e75)

Conflicts:
src/mds/Locker.cc : Resolved in snapflush_nudge

src/mds/Locker.cc

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