]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
client: use deep-copy when setting permission during make_request 51487/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 15:33:25 +0000 (21:03 +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 03eae6522fd035b4921e66387868b19478f808d3..82e14bc6549e285036a9027b970130eb37e06eda 100644 (file)
@@ -174,7 +174,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();
   }