diff options
author | Linus Torvalds <torvalds@linux-foundation.org> | 2014-10-31 16:18:47 -0700 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2014-10-31 16:18:47 -0700 |
commit | e2488ab6ab34cddccda5e839eaeb37f72701830e (patch) | |
tree | 5671f999ee9eb88c38bf6718b3857cfecd3c851d /fs/jbd/revoke.c | |
parent | 89453379aaf0608253124057df6cd8ac63948135 (diff) | |
parent | 3c9cafe05ff002eb84d438a02f3c8d468720463b (diff) | |
download | linux-e2488ab6ab34cddccda5e839eaeb37f72701830e.tar.bz2 |
Merge branch 'for_linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jack/linux-fs
Pull quota and ext3 fixes from Jan Kara.
* 'for_linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jack/linux-fs:
fs, jbd: use a more generic hash function
quota: Properly return errors from dquot_writeback_dquots()
ext3: Don't check quota format when there are no quota files
Diffstat (limited to 'fs/jbd/revoke.c')
-rw-r--r-- | fs/jbd/revoke.c | 7 |
1 files changed, 2 insertions, 5 deletions
diff --git a/fs/jbd/revoke.c b/fs/jbd/revoke.c index 8898bbd2b61e..dcead636c33b 100644 --- a/fs/jbd/revoke.c +++ b/fs/jbd/revoke.c @@ -93,6 +93,7 @@ #include <linux/bio.h> #endif #include <linux/log2.h> +#include <linux/hash.h> static struct kmem_cache *revoke_record_cache; static struct kmem_cache *revoke_table_cache; @@ -129,15 +130,11 @@ static void flush_descriptor(journal_t *, struct journal_head *, int, int); /* Utility functions to maintain the revoke table */ -/* Borrowed from buffer.c: this is a tried and tested block hash function */ static inline int hash(journal_t *journal, unsigned int block) { struct jbd_revoke_table_s *table = journal->j_revoke; - int hash_shift = table->hash_shift; - return ((block << (hash_shift - 6)) ^ - (block >> 13) ^ - (block << (hash_shift - 12))) & (table->hash_size - 1); + return hash_32(block, table->hash_shift); } static int insert_revoke_hash(journal_t *journal, unsigned int blocknr, |