summaryrefslogtreecommitdiff
path: root/fs/hfs/brec.c
diff options
context:
space:
mode:
Diffstat (limited to 'fs/hfs/brec.c')
-rw-r--r--fs/hfs/brec.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/fs/hfs/brec.c b/fs/hfs/brec.c
index 2a6f3c67cb3f..2e713673df42 100644
--- a/fs/hfs/brec.c
+++ b/fs/hfs/brec.c
@@ -424,6 +424,10 @@ skip:
if (new_node) {
__be32 cnid;
+ if (!new_node->parent) {
+ hfs_btree_inc_height(tree);
+ new_node->parent = tree->root;
+ }
fd->bnode = hfs_bnode_find(tree, new_node->parent);
/* create index key and entry */
hfs_bnode_read_key(new_node, fd->search_key, 14);