From: Felix Fietkau Date: Thu, 27 Aug 2015 12:40:57 +0000 (+0200) Subject: file: remove unnecessary sync() call X-Git-Url: https://git.librecmc.org/?p=oweals%2Fuci.git;a=commitdiff_plain;h=2cd94fd505b293e657278e31deb32a7d66d20714 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 --- 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); }