]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commitdiff
mds/MDCache: pass iterator by value
authorMax Kellermann <max.kellermann@ionos.com>
Fri, 4 Oct 2024 17:35:29 +0000 (19:35 +0200)
committerMax Kellermann <max.kellermann@ionos.com>
Wed, 9 Oct 2024 12:59:52 +0000 (14:59 +0200)
An iterator is just a pointer, and passing it by reference means we
pass a pointer to a pointer, which is useless overhead.

Signed-off-by: Max Kellermann <max.kellermann@ionos.com>
src/mds/MDCache.cc
src/mds/MDCache.h

index c433c77b45378af9d2dcec601791d74e3e5bef7d..090eb01a4f7aa5794fe594167cdda895b5157b6b 100644 (file)
@@ -12402,7 +12402,7 @@ void MDCache::fragment_drop_locks(fragment_info_t& info)
   //info.mdr.reset();
 }
 
-void MDCache::fragment_maybe_finish(const fragment_info_iterator& it)
+void MDCache::fragment_maybe_finish(const fragment_info_iterator it)
 {
   ceph_assert(kill_dirfrag_at != dirfrag_killpoint::FRAGMENT_MAYBE_FINISH);
 
index 0b01c9ab8594ce6491b2a8b159d4e83a445c23de..4a71550e4f7d8ca65c9eb0f1f1b403975b763cea 100644 (file)
@@ -1485,7 +1485,7 @@ private:
   void fragment_frozen(const MDRequestRef& mdr, int r);
   void fragment_unmark_unfreeze_dirs(const std::vector<CDir*>& dirs);
   void fragment_drop_locks(fragment_info_t &info);
-  void fragment_maybe_finish(const fragment_info_iterator& it);
+  void fragment_maybe_finish(const fragment_info_iterator it);
   void dispatch_fragment_dir(const MDRequestRef& mdr, bool abort_if_freezing=false);
   void _fragment_logged(const MDRequestRef& mdr);
   void _fragment_stored(const MDRequestRef& mdr);