]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commitdiff
mds:judgment added to avoid the risk of visting the NULL pointer 7358/head
authorKongming Wu <wu.kongming@h3c.com>
Tue, 26 Jan 2016 02:45:52 +0000 (10:45 +0800)
committerYehua <chen.yehua@h3c.com>
Tue, 26 Jan 2016 03:01:15 +0000 (11:01 +0800)
Signed-off-by: chenyehua11692 chen.yehua@h3c.com
src/mds/MDCache.cc

index bcf7046c86a8a933956a5d1eee8832b3a76741b6..2c61fae0ab616cca9d9eafad312214a2f471335f 100644 (file)
@@ -7406,7 +7406,7 @@ bool MDCache::shutdown_pass()
   assert(subtrees.empty());
 
   // Still replicas of mydir?
-  if (mydir->inode->is_replicated()) {
+  if ((mydir != NULL) && mydir->inode->is_replicated()) {
     // We do this because otherwise acks to locks could come in after
     // we cap the log.
     dout(7) << "waiting for mydir replicas to release: " << *mydir << dendl;