]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commitdiff
mds/Migrator.cc: reduce scope of 'in' in handle_export_prep()
authorDanny Al-Gaaf <danny.al-gaaf@bisect.de>
Sun, 2 Jun 2013 09:41:16 +0000 (11:41 +0200)
committerDanny Al-Gaaf <danny.al-gaaf@bisect.de>
Mon, 3 Jun 2013 09:55:50 +0000 (11:55 +0200)
Reduce scope of 'CInode *in' since it's the way it's done already
in other paths of the function.

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

index 59d7d8ebfb8731a65c0eb9c9637804836582a2f4..6ea28c9386ab27d67bc9ff48835c442f49ab9159 100644 (file)
@@ -1778,14 +1778,13 @@ void Migrator::handle_export_prep(MExportDirPrep *m)
       ::decode(start, q);
       dout(10) << " trace from " << df << " start " << start << " len " << p->length() << dendl;
 
-      CInode *in;
       CDir *cur = 0;
       if (start == 'd') {
        cur = cache->get_dirfrag(df);
        assert(cur);
        dout(10) << "  had " << *cur << dendl;
       } else if (start == 'f') {
-       in = cache->get_inode(df.ino);
+       CInode *in = cache->get_inode(df.ino);
        assert(in);
        dout(10) << "  had " << *in << dendl;
        cur = cache->add_replica_dir(q, in, oldauth, finished);
@@ -1794,6 +1793,7 @@ void Migrator::handle_export_prep(MExportDirPrep *m)
        // nothing
       } else
        assert(0 == "unrecognized start char");
+
       while (start != '-') {
        CDentry *dn = cache->add_replica_dentry(q, cur, finished);
        dout(10) << "  added " << *dn << dendl;