From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 2BAEB7F47B; Mon, 8 Apr 2024 13:57:33 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=10.30.226.201 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1712584653; cv=none; b=Qhfx0z8wDKQsqJQXaonwh/2L7d9A4a7v5pEfYpfsY2guwC8y7JtjlYZ9uC3Gag+1VwB5oBQtMUoTg6W22zDNrwjmic4/oPTrJRCH4UewlyWjslYEyKTQUg7IJREDsu5//7t/9amX0O9xBKUF2/8srHzw4xqqQb2XqcWcYuR+NVM= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1712584653; c=relaxed/simple; bh=MxQZT9x5GoTt+VzvJURbVPHyUnrPGaxdOFxHpbK+NBc=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=W2XQjXeLtKT0IGiy+mBcVVgeti/1ZWDNdM2U7jgEYv6ZUIIK+BSP+WSFkm7XqV3U8dmllQH8hTGxvpx0reJINkxVvJBbQ6W6EDL0FcFZcQSM1Rlnmhov2oIU0xvCLMQz88v2QI1RLiKJv5mDE1B5fQVGS/HygM9yrXuyi/EV/bw= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.b=VKYQ1QhO; arc=none smtp.client-ip=10.30.226.201 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.b="VKYQ1QhO" Received: by smtp.kernel.org (Postfix) with ESMTPSA id AC2A9C43399; Mon, 8 Apr 2024 13:57:32 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1712584653; bh=MxQZT9x5GoTt+VzvJURbVPHyUnrPGaxdOFxHpbK+NBc=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=VKYQ1QhOfvjO0OCwruLQ6wJZM0fmXiNwfQdo1xaKfxZIbsFqg1oXpkuyhJdxIki2p W2yikwcMcm5E7dFDPFOxonRaTbnbu2KyzdtcOlCUirLgVN+dIr6+zbqUPnG2wmcKqB SjNJdrzBrqze7njtJvSkHzBui9rTMH8X9SAUNwbc= From: Greg Kroah-Hartman To: stable@vger.kernel.org Cc: Greg Kroah-Hartman , patches@lists.linux.dev, Chuck Lever , Jeff Layton , NeilBrown Subject: [PATCH 5.15 484/690] NFSD: Use const pointers as parameters to fh_ helpers Date: Mon, 8 Apr 2024 14:55:50 +0200 Message-ID: <20240408125417.183214172@linuxfoundation.org> X-Mailer: git-send-email 2.44.0 In-Reply-To: <20240408125359.506372836@linuxfoundation.org> References: <20240408125359.506372836@linuxfoundation.org> User-Agent: quilt/0.67 X-stable: review X-Patchwork-Hint: ignore Precedence: bulk X-Mailing-List: patches@lists.linux.dev List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: 8bit 5.15-stable review patch. If anyone has any objections, please let me know. ------------------ From: Chuck Lever [ Upstream commit b48f8056c034f28dd54668399f1d22be421b0bef ] Enable callers to use const pointers where they are able to. Signed-off-by: Chuck Lever Tested-by: Jeff Layton Reviewed-by: Jeff Layton Reviewed-by: NeilBrown Signed-off-by: Chuck Lever --- fs/nfsd/nfsfh.h | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/fs/nfsd/nfsfh.h b/fs/nfsd/nfsfh.h index c3ae6414fc5cf..513e028b0bbee 100644 --- a/fs/nfsd/nfsfh.h +++ b/fs/nfsd/nfsfh.h @@ -220,7 +220,7 @@ __be32 fh_update(struct svc_fh *); void fh_put(struct svc_fh *); static __inline__ struct svc_fh * -fh_copy(struct svc_fh *dst, struct svc_fh *src) +fh_copy(struct svc_fh *dst, const struct svc_fh *src) { WARN_ON(src->fh_dentry); @@ -229,7 +229,7 @@ fh_copy(struct svc_fh *dst, struct svc_fh *src) } static inline void -fh_copy_shallow(struct knfsd_fh *dst, struct knfsd_fh *src) +fh_copy_shallow(struct knfsd_fh *dst, const struct knfsd_fh *src) { dst->fh_size = src->fh_size; memcpy(&dst->fh_raw, &src->fh_raw, src->fh_size); @@ -243,7 +243,8 @@ fh_init(struct svc_fh *fhp, int maxsize) return fhp; } -static inline bool fh_match(struct knfsd_fh *fh1, struct knfsd_fh *fh2) +static inline bool fh_match(const struct knfsd_fh *fh1, + const struct knfsd_fh *fh2) { if (fh1->fh_size != fh2->fh_size) return false; @@ -252,7 +253,8 @@ static inline bool fh_match(struct knfsd_fh *fh1, struct knfsd_fh *fh2) return true; } -static inline bool fh_fsid_match(struct knfsd_fh *fh1, struct knfsd_fh *fh2) +static inline bool fh_fsid_match(const struct knfsd_fh *fh1, + const struct knfsd_fh *fh2) { if (fh1->fh_fsid_type != fh2->fh_fsid_type) return false; -- 2.43.0