diff options
author | Kent Overstreet <kent.overstreet@linux.dev> | 2024-11-24 17:41:05 -0500 |
---|---|---|
committer | Kent Overstreet <kent.overstreet@linux.dev> | 2024-11-24 17:41:05 -0500 |
commit | 942bfc10d286a7fe82d8064250cf0341c1f86608 (patch) | |
tree | 63b28973f282d4c15507403b4869fd806d5a50eb /fs/bcachefs/fs.c | |
parent | 7f0ae9ab2f5f2ea12951f1d5ff04ff35bbee8d3f (diff) |
bcachefs: Switch to siphash for inode hash fninode_hash_find_debug
Signed-off-by: Kent Overstreet <kent.overstreet@linux.dev>
Diffstat (limited to 'fs/bcachefs/fs.c')
-rw-r--r-- | fs/bcachefs/fs.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/fs/bcachefs/fs.c b/fs/bcachefs/fs.c index a5b92a34a3b6..7444d194e60f 100644 --- a/fs/bcachefs/fs.c +++ b/fs/bcachefs/fs.c @@ -39,6 +39,7 @@ #include <linux/posix_acl.h> #include <linux/random.h> #include <linux/seq_file.h> +#include <linux/siphash.h> #include <linux/statfs.h> #include <linux/string.h> #include <linux/xattr.h> @@ -176,8 +177,9 @@ static bool subvol_inum_eq(subvol_inum a, subvol_inum b) static u32 bch2_vfs_inode_hash_fn(const void *data, u32 len, u32 seed) { const subvol_inum *inum = data; + siphash_key_t k = { .key[0] = seed }; - return jhash(&inum->inum, sizeof(inum->inum), seed); + return siphash_2u64(inum->subvol, inum->inum, &k); } static u32 bch2_vfs_inode_obj_hash_fn(const void *data, u32 len, u32 seed) |