From: Timo Sirainen Date: Fri, 16 Sep 2016 14:13:24 +0000 (+0300) Subject: fs-randomfail: Operation is unfinished on EAGAIN, not ENOENT. X-Git-Tag: 2.3.0.rc1~3012 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=50072aa4241f048dbdf4800c554b2766615c31d9;p=thirdparty%2Fdovecot%2Fcore.git fs-randomfail: Operation is unfinished on EAGAIN, not ENOENT. This caused crashes and other problems when using randomfail with asynchronous fs drivers. --- 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;