From da5b2447005fbc30e0693e22b7b5b0a96fc0024f Mon Sep 17 00:00:00 2001 From: Sage Weil Date: Sun, 21 Oct 2012 20:57:14 -0700 Subject: [PATCH] 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 --- src/mds/SessionMap.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/mds/SessionMap.h b/src/mds/SessionMap.h index 4735fed4a09..759454b1873 100644 --- a/src/mds/SessionMap.h +++ b/src/mds/SessionMap.h @@ -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];