summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorFelix Fietkau <nbd@openwrt.org>2015-08-27 14:40:57 +0200
committerFelix Fietkau <nbd@openwrt.org>2015-08-27 14:40:58 +0200
commit2cd94fd505b293e657278e31deb32a7d66d20714 (patch)
treee7d4e90b8440242c6af028e953b7062d3e83160c
parenta6a745338cd004a88edaaace5ca145a4411cdda9 (diff)
downloaduci-2cd94fd505b293e657278e31deb32a7d66d20714.tar.gz
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 <nbd@openwrt.org>
-rw-r--r--file.c1
1 files changed, 0 insertions, 1 deletions
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);
}