- ret = __build_dentry_tree_ntfs(&child, ni, ctx->path, path_len,
- ctx->lookup_table, ctx->sd_set,
- ctx->config, ctx->ntfs_vol_p);
- DEBUG("Linking dentry `%s' with parent `%s'",
- child->file_name_utf8, ctx->parent->file_name_utf8);
-
- link_dentry(child, ctx->parent);
- DEBUG("Return %d", ret);
-out_close_ni:
+ ret = build_dentry_tree_ntfs_recursive(&child, ni, ctx->path, path_len,
+ ctx->lookup_table, ctx->sd_set,
+ ctx->config, ctx->ntfs_vol_p);
+
+ if (child) {
+ DEBUG("Linking dentry `%s' with parent `%s'",
+ child->file_name_utf8, ctx->parent->file_name_utf8);
+ link_dentry(child, ctx->parent);
+ }