]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commitdiff
mds: avoid copy in SessionMap::get_or_add_session()
authorSage Weil <sage@inktank.com>
Mon, 22 Oct 2012 03:57:14 +0000 (20:57 -0700)
committerSage Weil <sage@inktank.com>
Mon, 22 Oct 2012 03:57:14 +0000 (20:57 -0700)
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>
src/mds/SessionMap.h

index 4735fed4a097bfa974b76fd437595b22b7f1a506..759454b1873c91d71e60dff2c34084236a908c27 100644 (file)
@@ -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];