]> git.apps.os.sepia.ceph.com Git - ceph-ci.git/commitdiff
mds: refactor const ref return to avoid mem alloc
authorPatrick Donnelly <pdonnell@redhat.com>
Thu, 21 Jun 2018 22:37:41 +0000 (15:37 -0700)
committerPatrick Donnelly <pdonnell@redhat.com>
Thu, 28 Jun 2018 23:02:37 +0000 (16:02 -0700)
Signed-off-by: Patrick Donnelly <pdonnell@redhat.com>
src/mds/SessionMap.h

index 7ae0ed28e676c34ba63b37e391aa52ba063c221b..730f2cbf85f0ef597edb4d54601d5c9600f4ade0 100644 (file)
@@ -125,7 +125,7 @@ public:
   }
   void decode(bufferlist::const_iterator &p);
   void set_client_metadata(std::map<std::string, std::string> const &meta);
-  std::string get_human_name() const {return human_name;}
+  const std::string& get_human_name() const {return human_name;}
 
   // Ephemeral state for tracking progress of capability recalls
   utime_t recalled_at;  // When was I asked to SESSION_RECALL?