]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
mds: remove the incorrect std::move for fsname and path 56981/head
authorXiubo Li <xiubli@redhat.com>
Thu, 18 Apr 2024 10:09:17 +0000 (18:09 +0800)
committerXiubo Li <xiubli@redhat.com>
Thu, 25 Apr 2024 01:47:47 +0000 (09:47 +0800)
When opening the sessions mds auth grants could be copied many
times, std::move here is incorrect and will leave the origin
as not usable.

Signed-off-by: Xiubo Li <xiubli@redhat.com>
src/mds/MDSAuthCaps.h

index 2b696085d5b91f4730fe3ca24d123fd6800eadab..26958b49acd3441657f4f9fe4eb6a7983ed57573 100644 (file)
@@ -118,8 +118,8 @@ struct MDSCapMatch {
   MDSCapMatch(const std::string& fsname_, const std::string& path_,
              bool root_squash_, int64_t uid_=MDS_AUTH_UID_ANY,
              const std::vector<gid_t>& gids_={}) {
-    fs_name = std::move(fsname_);
-    path = std::move(path_);
+    fs_name = fsname_;
+    path = path_;
     root_squash = root_squash_;
     uid = (uid_ == 0) ? -1 : uid_;
     gids = gids_;