mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git
synced 2024-10-03 23:58:05 +00:00
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>
This commit is contained in:
parent
e8f80c5545
commit
1736aec82a
1 changed files with 2 additions and 5 deletions
|
@ -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;
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue