]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commitdiff
mds: Use default implementations for copy constructor and assignment operator in... 65879/head
authorEdwin Rodriguez <edwin.rodriguez1@ibm.com>
Wed, 8 Oct 2025 16:07:43 +0000 (12:07 -0400)
committerEdwin Rodriguez <edwin.rodriguez1@ibm.com>
Mon, 13 Oct 2025 12:39:45 +0000 (08:39 -0400)
Fixes: https://tracker.ceph.com/issues/73425
Signed-off-by: Edwin Rodriguez <edwin.rodriguez1@ibm.com>
src/mds/MDSAuthCaps.h

index 89cabfb7d283d98688c2bf6833315702a31b9918..9668acc0c9c18b3e19e6668e24f9ef097f771585 100644 (file)
@@ -126,15 +126,8 @@ struct MDSCapMatch {
 
     normalize_path();
   }
-
-  const MDSCapMatch& operator=(const MDSCapMatch& m) {
-    uid = m.uid;
-    gids = m.gids;
-    path = m.path;
-    fs_name = m.fs_name;
-    root_squash = m.root_squash;
-    return *this;
-  }
+  MDSCapMatch(const MDSCapMatch& m) = default;
+  MDSCapMatch& operator=(const MDSCapMatch& m) = default;
 
   void normalize_path();
 
@@ -197,12 +190,8 @@ struct MDSCapAuth {
   MDSCapAuth(MDSCapMatch m, bool r, bool w) :
     match(m), readable(r), writeable(w) {}
 
-  const MDSCapAuth& operator=(const MDSCapAuth& m) {
-    match = m.match;
-    readable = m.readable;
-    writeable = m.writeable;
-    return *this;
-  }
+  MDSCapAuth(const MDSCapAuth& m) = default;
+  MDSCapAuth& operator=(const MDSCapAuth& m) = default;
 
   void encode(ceph::buffer::list& bl) const {
     ENCODE_START(1, 1, bl);