From 1daffa1cf9dd8b2e835eff77c9181a6e1028e08a Mon Sep 17 00:00:00 2001 From: "Richard M. Stallman" Date: Tue, 1 Jun 1993 21:15:25 +0000 Subject: [PATCH] (Fwrite_region): Don't fsync if autosaving. --- src/fileio.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/fileio.c b/src/fileio.c index 2c88a64976d..714c41410f7 100644 --- a/src/fileio.c +++ b/src/fileio.c @@ -2714,7 +2714,9 @@ to the file, instead of any buffer contents, and END is ignored.") #ifdef HAVE_FSYNC /* Note fsync appears to change the modtime on BSD4.2 (both vax and sun). Disk full in NFS may be reported here. */ - if (fsync (desc) < 0) + /* mib says that closing the file will try to write as fast as NFS can do + it, and that means the fsync here is not crucial for autosave files. */ + if (!auto_saving && fsync (desc) < 0) failure = 1, save_errno = errno; #endif -- 2.11.4.GIT