diff options
author | Kent Overstreet <kent.overstreet@gmail.com> | 2016-12-07 07:25:40 -0900 |
---|---|---|
committer | Kent Overstreet <kent.overstreet@gmail.com> | 2016-12-07 07:58:22 -0900 |
commit | 311833e55288475e5000cd163b67f65327df8f72 (patch) | |
tree | 40f8e687937353b3306b046b4a2d6937dde7c7d8 | |
parent | c5d3b06ad487416f359d39f9f09d701cafde177f (diff) |
bcache: fix hash usage for journal has_inode hash
-rw-r--r-- | drivers/md/bcache/journal.c | 2 | ||||
-rw-r--r-- | drivers/md/bcache/journal.h | 2 |
2 files changed, 2 insertions, 2 deletions
diff --git a/drivers/md/bcache/journal.c b/drivers/md/bcache/journal.c index 9aef28203545..254c3d2ab8c1 100644 --- a/drivers/md/bcache/journal.c +++ b/drivers/md/bcache/journal.c @@ -1998,7 +1998,7 @@ static void journal_write_work(struct work_struct *work) */ u64 bch_inode_journal_seq(struct journal *j, u64 inode) { - size_t h = hash_64(inode, sizeof(j->buf[0].has_inode) * 8); + size_t h = hash_64(inode, ilog2(sizeof(j->buf[0].has_inode) * 8)); u64 seq = 0; if (!test_bit(h, j->buf[0].has_inode) && diff --git a/drivers/md/bcache/journal.h b/drivers/md/bcache/journal.h index 827ce358932b..43aa2b68e7bf 100644 --- a/drivers/md/bcache/journal.h +++ b/drivers/md/bcache/journal.h @@ -171,7 +171,7 @@ static inline u64 bch_journal_res_seq(struct journal *j, static inline void bch_journal_set_has_inode(struct journal_buf *buf, u64 inum) { - set_bit(hash_64(inum, sizeof(buf->has_inode) * 8), buf->has_inode); + set_bit(hash_64(inum, ilog2(sizeof(buf->has_inode) * 8)), buf->has_inode); } /* |