From 50072aa4241f048dbdf4800c554b2766615c31d9 Mon Sep 17 00:00:00 2001 From: Timo Sirainen Date: Fri, 16 Sep 2016 17:13:24 +0300 Subject: [PATCH] fs-randomfail: Operation is unfinished on EAGAIN, not ENOENT. This caused crashes and other problems when using randomfail with asynchronous fs drivers. --- src/lib-fs/fs-randomfail.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/lib-fs/fs-randomfail.c b/src/lib-fs/fs-randomfail.c index 89f5310aab..c2f9b7d5ca 100644 --- a/src/lib-fs/fs-randomfail.c +++ b/src/lib-fs/fs-randomfail.c @@ -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;