From 9d3aecfa07baa8b563affa945d019e691753f6ef Mon Sep 17 00:00:00 2001 From: Jonas 'Sortie' Termansen Date: Sat, 31 Jan 2015 00:16:54 +0100 Subject: [PATCH] Work around sync on close bottleneck. --- kernel/io.cpp | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/kernel/io.cpp b/kernel/io.cpp index 98a6a536..3c57bd86 100644 --- a/kernel/io.cpp +++ b/kernel/io.cpp @@ -124,7 +124,11 @@ int sys_close(int fd) dtable.Reset(); if ( !desc ) return -1; - return desc->sync(&ctx); + // TODO: This can be a significant bottleneck. All we need to do is ask the + // filesystem for whether any errors occurred that should be reported + // at close time. + //return desc->sync(&ctx); + return 0; } int sys_closefrom(int fd)