Browse Source

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>
Felix Fietkau 8 years ago
parent
commit
2cd94fd505
1 changed files with 0 additions and 1 deletions
  1. 0 1
      file.c

+ 0 - 1
file.c

@@ -800,7 +800,6 @@ done:
 		UCI_THROW(ctx, UCI_ERR_IO);
 	}
 	free(filename);
-	sync();
 	if (ctx->err)
 		UCI_THROW(ctx, ctx->err);
 }