]> Git Repo - linux.git/blobdiff - fs/ubifs/misc.h
afs: Use d_instantiate() rather than d_add() and don't d_drop()
[linux.git] / fs / ubifs / misc.h
index 21d35d7dd975ca32c6d638e448b2e1632db1aa35..6f87237fdbf43bddc1455df20edf91abfca60caa 100644 (file)
@@ -197,7 +197,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;
 }
 
 /**
@@ -212,7 +213,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);
 }
 
 /**
This page took 0.031816 seconds and 4 git commands to generate.