]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commitdiff
client: optimize alternate_name passing to helper
authorPatrick Donnelly <pdonnell@redhat.com>
Wed, 4 Sep 2024 20:12:25 +0000 (16:12 -0400)
committerPatrick Donnelly <pdonnell@ibm.com>
Thu, 27 Feb 2025 18:41:54 +0000 (13:41 -0500)
Signed-off-by: Patrick Donnelly <pdonnell@redhat.com>
Fixes: https://tracker.ceph.com/issues/66373
src/client/Client.cc

index a15ef08832d6f4ee3b8acf45e80cb8253032f734..1531da12a9933038aa1bfa3ce107d615ee592813 100644 (file)
@@ -10120,7 +10120,7 @@ int Client::open(const char *relpath, int flags, const UserPerm& perms,
                 int object_size, const char *data_pool, std::string alternate_name)
 {
   return openat(CEPHFS_AT_FDCWD, relpath, flags, perms, mode, stripe_unit,
-                stripe_count, object_size, data_pool, alternate_name);
+                stripe_count, object_size, data_pool, std::move(alternate_name));
 }
 
 int Client::openat(int dirfd, const char *relpath, int flags, const UserPerm& perms,
@@ -10139,7 +10139,7 @@ int Client::openat(int dirfd, const char *relpath, int flags, const UserPerm& pe
 
   std::scoped_lock locker(client_lock);
   int r =  create_and_open(dirfd, relpath, flags, perms, mode, stripe_unit, stripe_count,
-                           object_size, data_pool, alternate_name);
+                           object_size, data_pool, std::move(alternate_name));
 
   tout(cct) << r << std::endl;
   ldout(cct, 3) << "openat exit(" << relpath << ")" << dendl;