mirror of
https://github.com/ceph/ceph
synced 2024-12-19 01:46:00 +00:00
mds: avoid copy in SessionMap::get_or_add_session()
CID 717032 (#1 of 1): Big parameter passed by value (PASS_BY_VALUE) Passing parameter i of type entity_inst_t (size 152 bytes) by value. Signed-off-by: Sage Weil <sage@inktank.com>
This commit is contained in:
parent
7a3ccef89c
commit
da5b244700
@ -276,7 +276,7 @@ public:
|
||||
return session_map[w];
|
||||
return 0;
|
||||
}
|
||||
Session* get_or_add_session(entity_inst_t i) {
|
||||
Session* get_or_add_session(const entity_inst_t& i) {
|
||||
Session *s;
|
||||
if (session_map.count(i.name))
|
||||
s = session_map[i.name];
|
||||
|
Loading…
Reference in New Issue
Block a user