From: Yongseok Oh Date: Mon, 20 Mar 2023 10:24:25 +0000 (+0900) Subject: mds: remove inappropriate initialization of num_imported X-Git-Tag: v19.0.0~1221^2 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=01d477eae40cbb543375bed8d955ca07c09ad959;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 --- diff --git a/src/mds/Migrator.cc b/src/mds/Migrator.cc index 130ed08c1d21..8bd875c3450e 100644 --- a/src/mds/Migrator.cc +++ b/src/mds/Migrator.cc @@ -3379,8 +3379,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.