Commit e2488ab6 authored by Linus Torvalds's avatar Linus Torvalds

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
parents 89453379 3c9cafe0
...@@ -1354,13 +1354,6 @@ static int parse_options (char *options, struct super_block *sb, ...@@ -1354,13 +1354,6 @@ static int parse_options (char *options, struct super_block *sb,
"not specified."); "not specified.");
return 0; return 0;
} }
} else {
if (sbi->s_jquota_fmt) {
ext3_msg(sb, KERN_ERR, "error: journaled quota format "
"specified with no journaling "
"enabled.");
return 0;
}
} }
#endif #endif
return 1; return 1;
......
...@@ -93,6 +93,7 @@ ...@@ -93,6 +93,7 @@
#include <linux/bio.h> #include <linux/bio.h>
#endif #endif
#include <linux/log2.h> #include <linux/log2.h>
#include <linux/hash.h>
static struct kmem_cache *revoke_record_cache; static struct kmem_cache *revoke_record_cache;
static struct kmem_cache *revoke_table_cache; static struct kmem_cache *revoke_table_cache;
...@@ -129,15 +130,11 @@ static void flush_descriptor(journal_t *, struct journal_head *, int, int); ...@@ -129,15 +130,11 @@ static void flush_descriptor(journal_t *, struct journal_head *, int, int);
/* Utility functions to maintain the revoke table */ /* 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) static inline int hash(journal_t *journal, unsigned int block)
{ {
struct jbd_revoke_table_s *table = journal->j_revoke; struct jbd_revoke_table_s *table = journal->j_revoke;
int hash_shift = table->hash_shift;
return ((block << (hash_shift - 6)) ^ return hash_32(block, table->hash_shift);
(block >> 13) ^
(block << (hash_shift - 12))) & (table->hash_size - 1);
} }
static int insert_revoke_hash(journal_t *journal, unsigned int blocknr, static int insert_revoke_hash(journal_t *journal, unsigned int blocknr,
......
...@@ -634,7 +634,7 @@ int dquot_writeback_dquots(struct super_block *sb, int type) ...@@ -634,7 +634,7 @@ int dquot_writeback_dquots(struct super_block *sb, int type)
dqstats_inc(DQST_LOOKUPS); dqstats_inc(DQST_LOOKUPS);
err = sb->dq_op->write_dquot(dquot); err = sb->dq_op->write_dquot(dquot);
if (!ret && err) if (!ret && err)
err = ret; ret = err;
dqput(dquot); dqput(dquot);
spin_lock(&dq_list_lock); spin_lock(&dq_list_lock);
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment