From d67e369433da5b59acecf2ee2b74813c1ff4d5b9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Josef=20S=C3=B6ntgen?= Date: Tue, 27 Feb 2018 14:07:51 +0100 Subject: [PATCH] libc: sync before calling fstat() Issue #2695 --- repos/libports/src/lib/libc/vfs_plugin.cc | 2 ++ 1 file changed, 2 insertions(+) diff --git a/repos/libports/src/lib/libc/vfs_plugin.cc b/repos/libports/src/lib/libc/vfs_plugin.cc index e23fb7fe71..1b644658bd 100644 --- a/repos/libports/src/lib/libc/vfs_plugin.cc +++ b/repos/libports/src/lib/libc/vfs_plugin.cc @@ -315,6 +315,8 @@ int Libc::Vfs_plugin::dup2(Libc::File_descriptor *fd, int Libc::Vfs_plugin::fstat(Libc::File_descriptor *fd, struct stat *buf) { + Vfs::Vfs_handle *handle = vfs_handle(fd); + _vfs_sync(handle); return stat(fd->fd_path, buf); }