From: Danny Al-Gaaf Date: Sun, 2 Jun 2013 09:41:16 +0000 (+0200) Subject: mds/Migrator.cc: reduce scope of 'in' in handle_export_prep() X-Git-Tag: v0.65~132^2~3 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=1b70fcd46c072aab9b03d4935b0dedc1d71711d8;p=ceph.git mds/Migrator.cc: reduce scope of 'in' in handle_export_prep() 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 --- diff --git a/src/mds/Migrator.cc b/src/mds/Migrator.cc index 59d7d8ebfb87..6ea28c9386ab 100644 --- a/src/mds/Migrator.cc +++ b/src/mds/Migrator.cc @@ -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;