summaryrefslogtreecommitdiffstats
path: root/fs/ubifs/misc.h
diff options
context:
space:
mode:
Diffstat (limited to 'fs/ubifs/misc.h')
-rw-r--r--fs/ubifs/misc.h5
1 files changed, 3 insertions, 2 deletions
diff --git a/fs/ubifs/misc.h b/fs/ubifs/misc.h
index 77429be554..82f9225657 100644
--- a/fs/ubifs/misc.h
+++ b/fs/ubifs/misc.h
@@ -188,7 +188,8 @@ static inline int ubifs_return_leb(struct ubifs_info *c, int lnum)
*/
static inline int ubifs_idx_node_sz(const struct ubifs_info *c, int child_cnt)
{
- return UBIFS_IDX_NODE_SZ + (UBIFS_BRANCH_SZ + c->key_len) * child_cnt;
+ return UBIFS_IDX_NODE_SZ + (UBIFS_BRANCH_SZ + c->key_len + c->hash_len)
+ * child_cnt;
}
/**
@@ -203,7 +204,7 @@ struct ubifs_branch *ubifs_idx_branch(const struct ubifs_info *c,
int bnum)
{
return (struct ubifs_branch *)((void *)idx->branches +
- (UBIFS_BRANCH_SZ + c->key_len) * bnum);
+ (UBIFS_BRANCH_SZ + c->key_len + c->hash_len) * bnum);
}
/**