]> git.baikalelectronics.ru Git - kernel.git/commit
fs, jbd: use a more generic hash function
authorSasha Levin <sasha.levin@oracle.com>
Tue, 21 Oct 2014 20:43:55 +0000 (16:43 -0400)
committerJan Kara <jack@suse.cz>
Wed, 22 Oct 2014 08:02:04 +0000 (10:02 +0200)
commit17a2e30c932f36d08dfdc0e711604ebec5cc20e8
treecf3d905c079b6e2f8b00d97523c8b4cdacf8edc1
parentfedad7a2c9ab3b9bba73f8e9c37d5ef5f80b9298
fs, jbd: use a more generic hash function

While the hash function used by the revoke hashtable is good somewhere else,
it's not really good here.

The default hash shift (8) means that one third of the hashing function
gets lost (and is undefined anyways (8 - 12 = negative shift)):

"(block << (hash_shift - 12))) & (table->hash_size - 1)"

Instead, just use the kernel's generic hash function that gets used everywhere
else.

Signed-off-by: Sasha Levin <sasha.levin@oracle.com>
Signed-off-by: Jan Kara <jack@suse.cz>
fs/jbd/revoke.c