]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
mds/MDCache.cc: fix dereference null return value
authorDanny Al-Gaaf <danny.al-gaaf@bisect.de>
Wed, 29 May 2013 13:14:28 +0000 (15:14 +0200)
committerDanny Al-Gaaf <danny.al-gaaf@bisect.de>
Fri, 31 May 2013 17:15:23 +0000 (19:15 +0200)
CID 716993 (#1 of 2): Dereference null return value (NULL_RETURNS)
  dereference: Dereferencing a pointer that might be null "in" when
  calling "operator <<(std::ostream &, CInode &)".

Add assert for 'in'.

Signed-off-by: Danny Al-Gaaf <danny.al-gaaf@bisect.de>
src/mds/MDCache.cc

index f7d5ed5ed8cc8657d5b350479b4dfd8bb24896eb..330e69507d96c9e522526a026314f36248df0bdc 100644 (file)
@@ -4012,6 +4012,7 @@ void MDCache::handle_cache_rejoin_weak(MMDSCacheRejoin *weak)
         p != weak->inode_scatterlocks.end();
         ++p) {
       CInode *in = get_inode(p->first);
+      assert(in);
       dout(10) << " including base inode (due to potential scatterlock update) " << *in << dendl;
       acked_inodes.insert(in->vino());
       ack->add_inode_base(in);