Skip to content

Commit b96998f

Browse files
committed
mds/MDCache: pass iterator by value
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 <[email protected]>
1 parent ddd63c0 commit b96998f

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

src/mds/MDCache.cc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12402,7 +12402,7 @@ void MDCache::fragment_drop_locks(fragment_info_t& info)
1240212402
//info.mdr.reset();
1240312403
}
1240412404

12405-
void MDCache::fragment_maybe_finish(const fragment_info_iterator& it)
12405+
void MDCache::fragment_maybe_finish(const fragment_info_iterator it)
1240612406
{
1240712407
ceph_assert(kill_dirfrag_at != dirfrag_killpoint::FRAGMENT_MAYBE_FINISH);
1240812408

src/mds/MDCache.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1485,7 +1485,7 @@ class MDCache {
14851485
void fragment_frozen(const MDRequestRef& mdr, int r);
14861486
void fragment_unmark_unfreeze_dirs(const std::vector<CDir*>& dirs);
14871487
void fragment_drop_locks(fragment_info_t &info);
1488-
void fragment_maybe_finish(const fragment_info_iterator& it);
1488+
void fragment_maybe_finish(const fragment_info_iterator it);
14891489
void dispatch_fragment_dir(const MDRequestRef& mdr, bool abort_if_freezing=false);
14901490
void _fragment_logged(const MDRequestRef& mdr);
14911491
void _fragment_stored(const MDRequestRef& mdr);

0 commit comments

Comments
 (0)