summaryrefslogtreecommitdiff
path: root/fs/nfsd
diff options
context:
space:
mode:
authorChuck Lever <chuck.lever@oracle.com>2021-05-14 22:56:25 +0300
committerJ. Bruce Fields <bfields@redhat.com>2021-05-18 20:44:03 +0300
commit1736aec82a15cb5d4b3bbe0b2fbae0ede66b1a1a (patch)
treeaba37daee445a680bd61aa5243a67edcdbf4c1fc /fs/nfsd
parente8f80c5545ec5794644b48537449e48b009d608d (diff)
downloadlinux-1736aec82a15cb5d4b3bbe0b2fbae0ede66b1a1a.tar.xz
NFSD: Constify @fh argument of knfsd_fh_hash()
Enable knfsd_fh_hash() to be invoked in functions where the filehandle pointer is a const. Signed-off-by: Chuck Lever <chuck.lever@oracle.com> Signed-off-by: J. Bruce Fields <bfields@redhat.com>
Diffstat (limited to 'fs/nfsd')
-rw-r--r--fs/nfsd/nfsfh.h7
1 files changed, 2 insertions, 5 deletions
diff --git a/fs/nfsd/nfsfh.h b/fs/nfsd/nfsfh.h
index aff2cda5c6c3..6106697adc04 100644
--- a/fs/nfsd/nfsfh.h
+++ b/fs/nfsd/nfsfh.h
@@ -225,15 +225,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;
}