diff options
author | Jeff Layton <jlayton@kernel.org> | 2023-03-03 07:16:02 -0500 |
---|---|---|
committer | Chuck Lever <chuck.lever@oracle.com> | 2023-04-26 09:05:00 -0400 |
commit | e59fb6749ed833deee5b3cfd7e89925296d41f49 (patch) | |
tree | e1cc663f2f29396afe1a9c23bc2773edd12384e4 /fs/nfs | |
parent | 244cc19196d2f6691d34e8cd9bc34a55e4f778e5 (diff) |
nfs: move nfs_fhandle_hash to common include file
lockd needs to be able to hash filehandles for tracepoints. Move the
nfs_fhandle_hash() helper to a common nfs include file.
Signed-off-by: Jeff Layton <jlayton@kernel.org>
Signed-off-by: Chuck Lever <chuck.lever@oracle.com>
Diffstat (limited to 'fs/nfs')
-rw-r--r-- | fs/nfs/internal.h | 15 |
1 files changed, 0 insertions, 15 deletions
diff --git a/fs/nfs/internal.h b/fs/nfs/internal.h index 2a65fe2a63ab..10fb5e7573eb 100644 --- a/fs/nfs/internal.h +++ b/fs/nfs/internal.h @@ -846,27 +846,12 @@ u64 nfs_timespec_to_change_attr(const struct timespec64 *ts) } #ifdef CONFIG_CRC32 -/** - * nfs_fhandle_hash - calculate the crc32 hash for the filehandle - * @fh - pointer to filehandle - * - * returns a crc32 hash for the filehandle that is compatible with - * the one displayed by "wireshark". - */ -static inline u32 nfs_fhandle_hash(const struct nfs_fh *fh) -{ - return ~crc32_le(0xFFFFFFFF, &fh->data[0], fh->size); -} static inline u32 nfs_stateid_hash(const nfs4_stateid *stateid) { return ~crc32_le(0xFFFFFFFF, &stateid->other[0], NFS4_STATEID_OTHER_SIZE); } #else -static inline u32 nfs_fhandle_hash(const struct nfs_fh *fh) -{ - return 0; -} static inline u32 nfs_stateid_hash(nfs4_stateid *stateid) { return 0; |