diff options
author | Richard Weinberger <richard@nod.at> | 2017-05-17 10:36:47 +0200 |
---|---|---|
committer | Richard Weinberger <richard@nod.at> | 2017-07-14 22:49:06 +0200 |
commit | 8b2900c01716077a42dbb44c691849ab694fa062 (patch) | |
tree | 1a6380ce5351ef599ed3290606847bd5b4b61f83 /fs/ubifs | |
parent | 781f675e2d7ec120e8c0803f88d7bf00fe3f0703 (diff) | |
download | linux-8b2900c01716077a42dbb44c691849ab694fa062.tar.bz2 |
ubifs: Add assert to dent_key_init()
...to make sure that we don't use it for double hashed lookups
instead of dent_key_init_hash().
Signed-off-by: Richard Weinberger <richard@nod.at>
Diffstat (limited to 'fs/ubifs')
-rw-r--r-- | fs/ubifs/key.h | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/fs/ubifs/key.h b/fs/ubifs/key.h index 7547be512db2..b1f7c0caa3ac 100644 --- a/fs/ubifs/key.h +++ b/fs/ubifs/key.h @@ -162,6 +162,7 @@ static inline void dent_key_init(const struct ubifs_info *c, uint32_t hash = c->key_hash(fname_name(nm), fname_len(nm)); ubifs_assert(!(hash & ~UBIFS_S_KEY_HASH_MASK)); + ubifs_assert(!nm->hash && !nm->minor_hash); key->u32[0] = inum; key->u32[1] = hash | (UBIFS_DENT_KEY << UBIFS_S_KEY_HASH_BITS); } |