]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commitdiff
mds/MDCache.cc: fix potential null pointer dereference
authorDanny Al-Gaaf <danny.al-gaaf@bisect.de>
Tue, 17 Mar 2015 17:18:34 +0000 (18:18 +0100)
committerDanny Al-Gaaf <danny.al-gaaf@bisect.de>
Wed, 15 Apr 2015 10:21:15 +0000 (12:21 +0200)
Signed-off-by: Danny Al-Gaaf <danny.al-gaaf@bisect.de>
src/mds/MDCache.cc

index bcda25159d9b001bd80455c53e17799f33e125c4..f9e5a48e85c33059a49252e802d1535f650bd455 100644 (file)
@@ -6935,7 +6935,6 @@ void MDCache::handle_cache_expire(MCacheExpire *m)
         ++it) {
       CDir *dir = get_dirfrag(it->first);
       unsigned nonce = it->second;
-      dout(20) << __func__ << ": expiring dirfrag " << *dir << dendl;
       
       if (!dir) {
        CInode *diri = get_inode(it->first.ino);
@@ -6967,8 +6966,10 @@ void MDCache::handle_cache_expire(MCacheExpire *m)
                << ", don't have it" << dendl;
        assert(dir);
       }
+      dout(20) << __func__ << ": expiring dirfrag " << *dir << dendl;
+
       assert(dir->is_auth());
-      
+
       // check nonce
       if (nonce == dir->get_replica_nonce(from)) {
        // remove from our cached_by