- /* Checksum the stream. */
- ret = ntfs_attr_sha1sum(ni, actx->attr, attr_hash,
- type == AT_REPARSE_POINT, &reparse_tag);
- if (ret != 0)
- goto out_put_actx;
-
- if (type == AT_REPARSE_POINT)
- inode->i_reparse_tag = reparse_tag;
-
- /* Make a lookup table entry for the stream, or use an existing
- * one if there's already an identical stream. */
- lte = __lookup_resource(lookup_table, attr_hash);
- ret = WIMLIB_ERR_NOMEM;
- if (lte) {
- lte->refcnt++;
- } else {
- ntfs_loc = CALLOC(1, sizeof(*ntfs_loc));
- if (!ntfs_loc)
- goto out_put_actx;
- ntfs_loc->ntfs_vol_p = ntfs_vol_p;
- ntfs_loc->path = MALLOC(path_len + 1);
- if (!ntfs_loc->path)
+ ntfs_loc->ntfs_vol = vol;
+ ntfs_loc->path = MALLOC(path_len + 1);
+ if (!ntfs_loc->path) {
+ ret = WIMLIB_ERR_NOMEM;
+ goto out_free_ntfs_loc;
+ }
+ memcpy(ntfs_loc->path, path, path_len + 1);
+ if (name_length) {
+ ntfs_loc->stream_name = MALLOC(name_length * 2);
+ if (!ntfs_loc->stream_name) {
+ ret = WIMLIB_ERR_NOMEM;