projects
/
GitHub
/
LineageOS
/
android_kernel_motorola_exynos9610.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
781f675
)
ubifs: Add assert to dent_key_init()
author
Richard Weinberger
<richard@nod.at>
Wed, 17 May 2017 08:36:47 +0000
(10:36 +0200)
committer
Richard Weinberger
<richard@nod.at>
Fri, 14 Jul 2017 20:49:06 +0000
(22:49 +0200)
...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>
fs/ubifs/key.h
patch
|
blob
|
blame
|
history
diff --git
a/fs/ubifs/key.h
b/fs/ubifs/key.h
index 7547be512db2632153ce20822dd0063dcdc5cddd..b1f7c0caa3acb60f53409d306da192b21b253e49 100644
(file)
--- 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);
}