From 541320cff7ed5370e010970ea62dea6bfef13fa3 Mon Sep 17 00:00:00 2001 From: Danny Al-Gaaf Date: Mon, 3 Jun 2013 12:48:33 +0200 Subject: [PATCH] mds/MDCache.cc: reduce scope of 'CDir *dir' in _create_system_file_finish() Signed-off-by: Danny Al-Gaaf --- src/mds/MDCache.cc | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/src/mds/MDCache.cc b/src/mds/MDCache.cc index d897d925bd0..dd8c95dbf46 100644 --- a/src/mds/MDCache.cc +++ b/src/mds/MDCache.cc @@ -493,9 +493,8 @@ void MDCache::_create_system_file_finish(Mutation *mut, CDentry *dn, version_t d in->inode.version--; in->mark_dirty(in->inode.version + 1, mut->ls); - CDir *dir = 0; if (in->inode.is_dir()) { - dir = in->get_dirfrag(frag_t()); + CDir *dir = in->get_dirfrag(frag_t()); assert(dir); dir->mark_dirty(1, mut->ls); dir->mark_new(mut->ls); -- 2.47.3