Blame SOURCES/e2fsprogs-1.42.9-14-filefrag-don-t-ignore-fsync-errors.patch

252946
From c7dcdc70473f524caa4d758233155df79bb1195d Mon Sep 17 00:00:00 2001
252946
From: Lukas Czerner <lczerner@redhat.com>
252946
Date: Thu, 21 Jun 2018 15:19:56 +0200
252946
Subject: [PATCH 08/16] filefrag: don't ignore fsync errors
252946
252946
commit a691f8d844faca28524b7c55780873244a070be7
252946
252946
Signed-off-by: Lukas Czerner <lczerner@redhat.com>
252946
Signed-off-by: Theodore Ts'o <tytso@mit.edu>
252946
---
252946
 misc/filefrag.c | 4 ++--
252946
 1 file changed, 2 insertions(+), 2 deletions(-)
252946
252946
diff --git a/misc/filefrag.c b/misc/filefrag.c
252946
index a050a226..1c16a2ef 100644
252946
--- a/misc/filefrag.c
252946
+++ b/misc/filefrag.c
252946
@@ -274,8 +274,8 @@ static int filefrag_fibmap(int fd, int blk_shift, int *num_extents,
252946
 		fm_ext.fe_flags = FIEMAP_EXTENT_MERGED;
252946
 	}
252946
 
252946
-	if (sync_file)
252946
-		fsync(fd);
252946
+	if (sync_file && fsync(fd) != 0)
252946
+		return -errno;
252946
 
252946
 	for (i = 0, logical = 0, *num_extents = 0, count = last_block = 0;
252946
 	     i < numblocks;
252946
-- 
252946
2.20.1
252946