Skip to content

Commit

Permalink
lib-fs: Do not abort parent of parent
Browse files Browse the repository at this point in the history
  • Loading branch information
cmouse authored and sirainen committed Sep 6, 2016
1 parent 8dfdcd1 commit cfb4971
Show file tree
Hide file tree
Showing 6 changed files with 7 additions and 7 deletions.
2 changes: 1 addition & 1 deletion src/lib-fs/fs-metawrap.c
Expand Up @@ -365,7 +365,7 @@ static int fs_metawrap_write_stream_finish(struct fs_file *_file, bool success)
if (file->super_output != NULL) {
/* no metawrap */
i_assert(file->temp_output == NULL);
fs_write_stream_abort_parent(_file->parent, &file->super_output);
fs_write_stream_abort_parent(_file, &file->super_output);
} else {
i_assert(file->temp_output != NULL);
o_stream_destroy(&file->temp_output);
Expand Down
2 changes: 1 addition & 1 deletion src/lib-fs/fs-randomfail.c
Expand Up @@ -404,7 +404,7 @@ static int fs_randomfail_write_stream_finish(struct fs_file *_file, bool success
else
o_stream_unref(&_file->output);
if (!success) {
fs_write_stream_abort_parent(_file->parent, &file->super_output);
fs_write_stream_abort_parent(_file, &file->super_output);
return -1;
}
if (!fs_random_fail(_file->fs, 1, FS_OP_WRITE)) {
Expand Down
2 changes: 1 addition & 1 deletion src/lib-fs/fs-sis-queue.c
Expand Up @@ -149,7 +149,7 @@ static int fs_sis_queue_write_stream_finish(struct fs_file *_file, bool success)

if (!success) {
if (_file->parent != NULL)
fs_write_stream_abort_parent(_file->parent, &_file->output);
fs_write_stream_abort_parent(_file, &_file->output);
return -1;
}

Expand Down
4 changes: 2 additions & 2 deletions src/lib-fs/fs-sis.c
Expand Up @@ -287,7 +287,7 @@ static int fs_sis_write_stream_finish(struct fs_file *_file, bool success)

if (!success) {
if (_file->parent != NULL)
fs_write_stream_abort_parent(_file->parent, &file->fs_output);
fs_write_stream_abort_parent(_file, &file->fs_output);
o_stream_unref(&_file->output);
return -1;
}
Expand All @@ -297,7 +297,7 @@ static int fs_sis_write_stream_finish(struct fs_file *_file, bool success)
i_stream_is_eof(file->hash_input)) {
o_stream_unref(&_file->output);
if (fs_sis_try_link(file)) {
fs_write_stream_abort_parent(_file->parent, &file->fs_output);
fs_write_stream_abort_parent(_file, &file->fs_output);
return 1;
}
}
Expand Down
2 changes: 1 addition & 1 deletion src/lib-fs/fs-wrapper.c
Expand Up @@ -79,7 +79,7 @@ void fs_wrapper_write_stream(struct fs_file *file)
int fs_wrapper_write_stream_finish(struct fs_file *file, bool success)
{
if (!success) {
fs_write_stream_abort_parent(file->parent, &file->output);
fs_write_stream_abort_parent(file, &file->output);
return -1;
}

Expand Down
2 changes: 1 addition & 1 deletion src/plugins/fs-compress/fs-compress.c
Expand Up @@ -201,7 +201,7 @@ static int fs_compress_write_stream_finish(struct fs_file *_file, bool success)
if (file->temp_output != NULL)
o_stream_destroy(&file->temp_output);
if (file->super_output != NULL)
fs_write_stream_abort_parent(_file->parent, &file->super_output);
fs_write_stream_abort_parent(_file, &file->super_output);
return -1;
}

Expand Down

0 comments on commit cfb4971

Please sign in to comment.