From 2ca75522fdce3f551272b8b19371737800ed7526 Mon Sep 17 00:00:00 2001 From: Xiubo Li Date: Thu, 18 Apr 2024 18:09:17 +0800 Subject: [PATCH] mds: remove the incorrect std::move for fsname and path 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 --- src/mds/MDSAuthCaps.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/mds/MDSAuthCaps.h b/src/mds/MDSAuthCaps.h index 2b696085d5b91..26958b49acd34 100644 --- a/src/mds/MDSAuthCaps.h +++ b/src/mds/MDSAuthCaps.h @@ -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& 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_; -- 2.39.5