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>
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;