[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-Id: <20180621131956.6951-1-lczerner@redhat.com>
Date: Thu, 21 Jun 2018 15:19:56 +0200
From: Lukas Czerner <lczerner@...hat.com>
To: linux-ext4@...r.kernel.org
Cc: tytso@....edu, Lukas Czerner <lczerner@...hat.com>
Subject: [PATCH] filefrag: don't ignore fsync errors
Signed-off-by: Lukas Czerner <lczerner@...hat.com>
---
misc/filefrag.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/misc/filefrag.c b/misc/filefrag.c
index dc003931..c8444d76 100644
--- a/misc/filefrag.c
+++ b/misc/filefrag.c
@@ -306,8 +306,8 @@ static int filefrag_fibmap(int fd, int blk_shift, int *num_extents,
fm_ext.fe_flags = FIEMAP_EXTENT_MERGED;
}
- if (sync_file)
- fsync(fd);
+ if (sync_file && fsync(fd) != 0)
+ return -errno;
for (i = 0, logical = 0, *num_extents = 0, count = last_block = 0;
i < numblocks;
--
2.17.1
Powered by blists - more mailing lists