提交 38cf5507 编写于 作者: S Shengliang Guan

TD-2877

上级 0ef402dc
......@@ -156,7 +156,7 @@ static int32_t dnodeWriteCfg() {
len += snprintf(content + len, maxLen - len, "}\n");
fwrite(content, 1, len, fp);
fflush(fp);
fsync(fileno(fp));
fclose(fp);
free(content);
terrno = 0;
......
......@@ -277,7 +277,7 @@ static int32_t dnodeWriteEps() {
len += snprintf(content + len, maxLen - len, "}\n");
fwrite(content, 1, len, fp);
fflush(fp);
fsync(fileno(fp));
fclose(fp);
free(content);
terrno = 0;
......
......@@ -286,7 +286,7 @@ static int32_t dnodeWriteMInfos() {
len += snprintf(content + len, maxLen - len, "}\n");
fwrite(content, 1, len, fp);
fflush(fp);
fsync(fileno(fp));
fclose(fp);
free(content);
terrno = 0;
......
......@@ -123,7 +123,7 @@ static void mnodePrintUserAuth() {
mnodeDecUserRef(pUser);
}
fflush(fp);
fsync(fileno(fp));
fclose(fp);
}
......
......@@ -341,7 +341,7 @@ int32_t vnodeWriteCfg(SCreateVnodeMsg *pMsg) {
len += snprintf(content + len, maxLen - len, "}\n");
fwrite(content, 1, len, fp);
fflush(fp);
fsync(fileno(fp));
fclose(fp);
free(content);
terrno = 0;
......
......@@ -90,7 +90,7 @@ int32_t vnodeSaveVersion(SVnodeObj *pVnode) {
len += snprintf(content + len, maxLen - len, "}\n");
fwrite(content, 1, len, fp);
fflush(fp);
fsync(fileno(fp));
fclose(fp);
free(content);
terrno = 0;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册