Skip to content

Commit 2ca7552

Browse files
committed
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 <[email protected]>
1 parent 4e213a5 commit 2ca7552

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/mds/MDSAuthCaps.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -118,8 +118,8 @@ struct MDSCapMatch {
118118
MDSCapMatch(const std::string& fsname_, const std::string& path_,
119119
bool root_squash_, int64_t uid_=MDS_AUTH_UID_ANY,
120120
const std::vector<gid_t>& gids_={}) {
121-
fs_name = std::move(fsname_);
122-
path = std::move(path_);
121+
fs_name = fsname_;
122+
path = path_;
123123
root_squash = root_squash_;
124124
uid = (uid_ == 0) ? -1 : uid_;
125125
gids = gids_;

0 commit comments

Comments
 (0)