]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
mds: remove inappropriate initialization of num_imported 51697/head
authorYongseok Oh <yongseok.oh@linecorp.com>
Mon, 20 Mar 2023 10:24:25 +0000 (19:24 +0900)
committerDhairya Parmar <dparmar@redhat.com>
Tue, 23 May 2023 08:52:05 +0000 (14:22 +0530)
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 <yongseok.oh@linecorp.com>
(cherry picked from commit 01d477eae40cbb543375bed8d955ca07c09ad959)

src/mds/Migrator.cc

index 2e76fc2a2b56f846e69d143188567f10406e9ea9..f32e43c0ee5146c7b1364a2bbfdc8818f7bb03f2 100644 (file)
@@ -3394,8 +3394,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.