From: Edwin Rodriguez Date: Wed, 8 Oct 2025 16:07:43 +0000 (-0400) Subject: mds: Use default implementations for copy constructor and assignment operator in... X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=8b7366f2562a86baa12c39dd5d51211f47d586fe;p=ceph.git mds: Use default implementations for copy constructor and assignment operator in MDSCapMatch and MDSCapAuth Fixes: https://tracker.ceph.com/issues/73425 Signed-off-by: Edwin Rodriguez --- diff --git a/src/mds/MDSAuthCaps.h b/src/mds/MDSAuthCaps.h index 89cabfb7d28..9668acc0c9c 100644 --- a/src/mds/MDSAuthCaps.h +++ b/src/mds/MDSAuthCaps.h @@ -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);