From d1446aa7c64113d0822f9a04326e417d60ae34c2 Mon Sep 17 00:00:00 2001 From: Artem Bityutskiy Date: Tue, 17 May 2011 06:26:45 +0300 Subject: 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 --- tests/fs-tests/integrity/integck.c | 2 ++ 1 file changed, 2 insertions(+) (limited to 'tests') 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; } -- cgit v1.2.3