]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commitdiff
client: use deep-copy when setting permission during make_request 51484/head
authorMer Xuanyi <xuanyi.meng@xtaotech.com>
Mon, 24 Apr 2023 03:51:38 +0000 (11:51 +0800)
committerVenky Shankar <vshankar@redhat.com>
Mon, 15 May 2023 14:59:03 +0000 (20:29 +0530)
We need MetaRequest's perms.gids keeps longer than syscal if mds reboot.
When mds reboot we need to rebuild MClientRequest with MetaRequest.

Fixes: https://tracker.ceph.com/issues/59514
Signed-off-by: Mer Xuanyi <xuanyi.meng@xtaotech.com>
(cherry picked from commit b88f50d1e396dc546a7a760da522ad434325bcd8)

src/client/MetaRequest.h

index ea39306608254e371003b055d4d5aae7f65120a8..a1c9f94598bd96f6734f80e077e4809cc54a93d0 100644 (file)
@@ -163,7 +163,7 @@ public:
   void set_alternate_name(std::string an) { alternate_name = an; }
   void set_string2(const char *s) { path2.set_path(std::string_view(s), 0); }
   void set_caller_perms(const UserPerm& _perms) {
-    perms.shallow_copy(_perms);
+    perms = _perms;
     head.caller_uid = perms.uid();
     head.caller_gid = perms.gid();
   }