diff options
author | Greg Farnum <gregf@hq.newdream.net> | 2010-11-23 23:40:54 +0100 |
---|---|---|
committer | Greg Farnum <gregf@hq.newdream.net> | 2010-11-23 23:40:54 +0100 |
commit | d8652de61647ae19ad0f3ec90fad00930cdd5afd (patch) | |
tree | 3fe38423a6e53748266474f1a72fc655251ba5e5 | |
parent | mds: Reply checking_lock while reading filelock (diff) | |
download | ceph-d8652de61647ae19ad0f3ec90fad00930cdd5afd.tar.xz ceph-d8652de61647ae19ad0f3ec90fad00930cdd5afd.zip |
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 <gregf@hq.newdream.net>
-rw-r--r-- | src/mds/MDCache.cc | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/src/mds/MDCache.cc b/src/mds/MDCache.cc index 5265a1d047d..9f67469ccd8 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); } |