From: Greg Farnum Date: Tue, 23 Nov 2010 22:40:54 +0000 (-0800) Subject: mdcache: in trim_non_auth, only print out path if it has a parent dentry. X-Git-Tag: v0.23.2~7 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=d8652de61647ae19ad0f3ec90fad00930cdd5afd;p=ceph.git mdcache: in trim_non_auth, only print out path if it has a parent dentry. This should only occur with the root inode, but caused a segfault for anybody running more than one MDS who restarted. Signed-off-by: Greg Farnum --- diff --git a/src/mds/MDCache.cc b/src/mds/MDCache.cc index 5265a1d047d7..9f67469ccd8a 100644 --- a/src/mds/MDCache.cc +++ b/src/mds/MDCache.cc @@ -5203,7 +5203,8 @@ void MDCache::trim_non_auth() in->close_dirfrag((*p)->dirfrag().frag); } dout(0) << " ... " << *in << dendl; - warn_string_dirs << in->get_parent_dn()->get_name() << std::endl; + if (in->get_parent_dn()) + warn_string_dirs << in->get_parent_dn()->get_name() << std::endl; assert(in->get_num_ref() == 0); remove_inode(in); }