kmod/0002-kmod-20-8-depmod-Don-t-unlinkat-orig-depfile-and-add-fsync.patch

38 lines
797 B
Diff
Raw Normal View History

2019-09-30 10:54:27 -04:00
From 0f3d89015caf91ea96359ba7e2afd2aa8ab67e85 Mon Sep 17 00:00:00 2001
From: guoxiaoqi <guoxiaoqi2@huawei.com>
Date: Fri, 25 Jan 2019 17:03:05 +0000
Subject: [PATCH] ok
Signed-off-by: guoxiaoqi <guoxiaoqi2@huawei.com>
2020-04-24 16:07:43 +08:00
---
tools/depmod.c | 5 ++++-
1 file changed, 4 insertions(+), 1 deletion(-)
2019-09-30 10:54:27 -04:00
diff --git a/tools/depmod.c b/tools/depmod.c
2020-04-24 16:07:43 +08:00
index fbbce10..01db7ad 100644
2019-09-30 10:54:27 -04:00
--- a/tools/depmod.c
+++ b/tools/depmod.c
2020-04-24 16:07:43 +08:00
@@ -2529,6 +2529,7 @@ static int depmod_output(struct depmod *depmod, FILE *out)
2019-09-30 10:54:27 -04:00
if (fp == out)
continue;
2020-04-24 16:07:43 +08:00
2019-09-30 10:54:27 -04:00
+ fsync(fileno(fp));
ferr = ferror(fp) | fclose(fp);
if (r < 0) {
2020-04-24 16:07:43 +08:00
@@ -2556,8 +2557,10 @@ static int depmod_output(struct depmod *depmod, FILE *out)
2019-09-30 10:54:27 -04:00
}
}
- if (dfd >= 0)
+ if (dfd >= 0) {
+ fsync(dfd);
close(dfd);
+ }
return err;
}
--
2020-04-24 16:07:43 +08:00
2.19.1
2019-09-30 10:54:27 -04:00