Skip to content

Commit

Permalink
fs-randomfail: Operation is unfinished on EAGAIN, not ENOENT.
Browse files Browse the repository at this point in the history
This caused crashes and other problems when using randomfail with
asynchronous fs drivers.
  • Loading branch information
sirainen committed Sep 16, 2016
1 parent c45da70 commit 50072aa
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/lib-fs/fs-randomfail.c
Expand Up @@ -259,7 +259,7 @@ static int
fs_file_random_fail_end(struct randomfail_fs_file *file,
int ret, enum fs_op op)
{
if (ret == 0 || errno != ENOENT) {
if (ret == 0 || errno != EAGAIN) {
if (fs_random_fail(file->file.fs, 2, op))
return -1;
file->op_pending[op] = FALSE;
Expand Down

0 comments on commit 50072aa

Please sign in to comment.