From 01d477eae40cbb543375bed8d955ca07c09ad959 Mon Sep 17 00:00:00 2001 From: Yongseok Oh Date: Mon, 20 Mar 2023 19:24:25 +0900 Subject: [PATCH] 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 --- src/mds/Migrator.cc | 2 -- 1 file changed, 2 deletions(-) diff --git a/src/mds/Migrator.cc b/src/mds/Migrator.cc index 130ed08c1d21f..8bd875c3450ef 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. -- 2.39.5