From: Artem Bityutskiy Date: Tue, 17 May 2011 03:26:45 +0000 (+0300) Subject: fs-tests: integck: return error if fsync fails X-Git-Tag: v1.4.5~46 X-Git-Url: https://www.infradead.org/git/?a=commitdiff_plain;h=d1446aa7c64113d0822f9a04326e417d60ae34c2;p=mtd-utils.git fs-tests: integck: return error if fsync fails If 'fsync()' or 'fdatasync()' fail we have to return an error, but we by mistake were returning 0 (success). Signed-off-by: Artem Bityutskiy --- diff --git a/tests/fs-tests/integrity/integck.c b/tests/fs-tests/integrity/integck.c index 81d384f..83706f8 100644 --- a/tests/fs-tests/integrity/integck.c +++ b/tests/fs-tests/integrity/integck.c @@ -1280,6 +1280,8 @@ static int file_write(struct file_info *file, int fd) pcv("fdatasync failed for %s", get_file_name(file)); } + if (ret) + return -1; file->clean = 1; }