All of lore.kernel.org
 help / color / mirror / Atom feed
From: Chuck Lever <chuck.lever@oracle.com>
To: bfields@fieldses.org, Bill.Baker@oracle.com
Cc: linux-nfs@vger.kernel.org
Subject: [PATCH RFC 06/21] NFSD: Constify @fh argument of knfsd_fh_hash()
Date: Wed, 16 Sep 2020 17:42:44 -0400	[thread overview]
Message-ID: <160029256470.29208.12060672647527057465.stgit@klimt.1015granger.net> (raw)
In-Reply-To: <160029169954.29208.8757662600714736320.stgit@klimt.1015granger.net>

Refactor: Enable knfsd_fh_hash() to be invoked in functions where
the FH is const.

Signed-off-by: Chuck Lever <chuck.lever@oracle.com>
---
 fs/nfsd/nfsfh.h |    7 ++-----
 1 file changed, 2 insertions(+), 5 deletions(-)

diff --git a/fs/nfsd/nfsfh.h b/fs/nfsd/nfsfh.h
index 56cfbc361561..1a2e28369d04 100644
--- a/fs/nfsd/nfsfh.h
+++ b/fs/nfsd/nfsfh.h
@@ -219,15 +219,12 @@ static inline bool fh_fsid_match(struct knfsd_fh *fh1, struct knfsd_fh *fh2)
  * returns a crc32 hash for the filehandle that is compatible with
  * the one displayed by "wireshark".
  */
-
-static inline u32
-knfsd_fh_hash(struct knfsd_fh *fh)
+static inline u32 knfsd_fh_hash(const struct knfsd_fh *fh)
 {
 	return ~crc32_le(0xFFFFFFFF, (unsigned char *)&fh->fh_base, fh->fh_size);
 }
 #else
-static inline u32
-knfsd_fh_hash(struct knfsd_fh *fh)
+static inline u32 knfsd_fh_hash(const struct knfsd_fh *fh)
 {
 	return 0;
 }



  parent reply	other threads:[~2020-09-16 22:18 UTC|newest]

Thread overview: 25+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-09-16 21:42 [PATCH RFC 00/21] NFSD operation monitoring tracepoints Chuck Lever
2020-09-16 21:42 ` [PATCH RFC 01/21] NFSD: Add SPDK header for fs/nfsd/trace.c Chuck Lever
2020-09-17  6:13   ` Christoph Hellwig
2020-09-17 12:31     ` Chuck Lever
2020-09-16 21:42 ` [PATCH RFC 02/21] SUNRPC: Move the svc_xdr_recvfrom() tracepoint Chuck Lever
2020-09-16 21:42 ` [PATCH RFC 03/21] SUNRPC: Add svc_xdr_authenticate tracepoint Chuck Lever
2020-09-16 21:42 ` [PATCH RFC 04/21] NFSD: Clean up the show_nf_may macro Chuck Lever
2020-09-16 21:42 ` [PATCH RFC 05/21] NFSD: Remove extra "0x" in tracepoint format specifier Chuck Lever
2020-09-16 21:42 ` Chuck Lever [this message]
2020-09-16 21:42 ` [PATCH RFC 07/21] NFSD: Add tracepoint in nfsd_setattr() Chuck Lever
2020-09-16 21:42 ` [PATCH RFC 08/21] NFSD: Add tracepoint for nfsd_access() Chuck Lever
2020-09-16 21:43 ` [PATCH RFC 09/21] NFSD: nfsd_compound_status tracepoint should record XID Chuck Lever
2020-09-16 21:43 ` [PATCH RFC 10/21] NFSD: Add client ID lifetime tracepoints Chuck Lever
2020-09-17 15:16   ` kernel test robot
2020-09-16 21:43 ` [PATCH RFC 11/21] NFSD: Add tracepoints to report NFSv4 session state Chuck Lever
2020-09-16 21:43 ` [PATCH RFC 12/21] NFSD: Add a tracepoint to report the current filehandle Chuck Lever
2020-09-16 21:43 ` [PATCH RFC 13/21] NFSD: Add GETATTR tracepoint Chuck Lever
2020-09-16 21:43 ` [PATCH RFC 14/21] NFSD: Add tracepoint in nfsd4_stateid_preprocess() Chuck Lever
2020-09-16 21:43 ` [PATCH RFC 15/21] NFSD: Add tracepoint to report arguments to NFSv4 OPEN Chuck Lever
2020-09-16 21:43 ` [PATCH RFC 16/21] NFSD: Add CLOSE tracepoint Chuck Lever
2020-09-16 21:43 ` [PATCH RFC 17/21] NFSD: Add a tracepoint for DELEGRETURN Chuck Lever
2020-09-16 21:43 ` [PATCH RFC 18/21] NFSD: Add a lookup tracepoint Chuck Lever
2020-09-16 21:43 ` [PATCH RFC 19/21] NFSD: Add lock and locku tracepoints Chuck Lever
2020-09-16 21:43 ` [PATCH RFC 20/21] NFSD: Add tracepoints to record the result of TEST_STATEID and FREE_STATEID Chuck Lever
2020-09-16 21:44 ` [PATCH RFC 21/21] NFSD: Rename nfsd_ tracepoints to nfsd4_ Chuck Lever

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=160029256470.29208.12060672647527057465.stgit@klimt.1015granger.net \
    --to=chuck.lever@oracle.com \
    --cc=Bill.Baker@oracle.com \
    --cc=bfields@fieldses.org \
    --cc=linux-nfs@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.