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

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