From: Greg Farnum Date: Fri, 5 Nov 2010 19:45:06 +0000 (-0700) Subject: mds: Fix bad inode deref. X-Git-Tag: v0.23~22^2~4 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=4cee6ead7b51dd3b7f6567f818906bdfddf83d1b;p=ceph.git mds: Fix bad inode deref. Accidentally trying to print out the CInode after removing it in trim_non_auth! Move the print to before it's been unlinked/removed/etc. --- diff --git a/src/mds/MDCache.cc b/src/mds/MDCache.cc index 57ffb192d285..f739d9d37261 100644 --- a/src/mds/MDCache.cc +++ b/src/mds/MDCache.cc @@ -5110,6 +5110,7 @@ void MDCache::trim_non_auth() else if (dnl->is_primary()) { CInode *in = dnl->get_inode(); list ls; + warn_string_dirs << in->get_parent_dn()->get_name() << std::endl; in->get_dirfrags(ls); for (list::iterator p = ls.begin(); p != ls.end(); ++p) { CDir *subdir = *p; @@ -5121,7 +5122,6 @@ void MDCache::trim_non_auth() } dir->unlink_inode(dn); remove_inode(in); - warn_string_dirs << in->get_parent_dn()->get_name() << std::endl; } else { assert(dnl->is_null());