From 2cd94fd505b293e657278e31deb32a7d66d20714 Mon Sep 17 00:00:00 2001 From: Felix Fietkau Date: Thu, 27 Aug 2015 14:40:57 +0200 Subject: [PATCH] file: remove unnecessary sync() call It can be too expensive during filesystem initialization, and it is not required for atomic handling of config changes. If the write gets interrupted, the config file will always contain either the new state or the old state Signed-off-by: Felix Fietkau --- file.c | 1 - 1 file changed, 1 deletion(-) diff --git a/file.c b/file.c index cf0dfaf..341a706 100644 --- a/file.c +++ b/file.c @@ -800,7 +800,6 @@ done: UCI_THROW(ctx, UCI_ERR_IO); } free(filename); - sync(); if (ctx->err) UCI_THROW(ctx, ctx->err); } -- 2.11.0