From: Yongseok Oh Date: Mon, 20 Mar 2023 10:24:25 +0000 (+0900) Subject: mds: remove inappropriate initialization of num_imported X-Git-Tag: v16.2.14~53^2 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=7ca217456f1ac07dc959b4c731285f56da49841f;p=ceph.git mds: remove inappropriate initialization of num_imported The variable num_imported is being passed by reference. Additionally, the decode_import_dir() function is invoked from handle_export_dir(), where num_imported is initialized and passed by reference. Therefore, there is no need to initialize it again within the decode_import_dir() function. fixes: https://tracker.ceph.com/issues/59107 Signed-off-by: Yongseok Oh (cherry picked from commit 01d477eae40cbb543375bed8d955ca07c09ad959) --- diff --git a/src/mds/Migrator.cc b/src/mds/Migrator.cc index 13bd2652aab..af4ac061f69 100644 --- a/src/mds/Migrator.cc +++ b/src/mds/Migrator.cc @@ -3393,8 +3393,6 @@ void Migrator::decode_import_dir(bufferlist::const_iterator& blp, if (le) le->metablob.add_import_dir(dir); - int num_imported = 0; - // take all waiters on this dir // NOTE: a pass of imported data is guaranteed to get all of my waiters because // a replica's presense in my cache implies/forces it's presense in authority's.