!54 kmod: revert "depmod: Do not unlinkat orig depfile and add fync"

Merge pull request !54 from xiaojiangfeng/master
This commit is contained in:
openeuler-ci-bot 2021-12-13 10:37:41 +00:00 committed by Gitee
commit 08bdeb96a7
5 changed files with 7 additions and 42 deletions

View File

@ -1,37 +0,0 @@
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>
---
tools/depmod.c | 5 ++++-
1 file changed, 4 insertions(+), 1 deletion(-)
diff --git a/tools/depmod.c b/tools/depmod.c
index fbbce10..01db7ad 100644
--- a/tools/depmod.c
+++ b/tools/depmod.c
@@ -2529,6 +2529,7 @@ static int depmod_output(struct depmod *depmod, FILE *out)
if (fp == out)
continue;
+ fsync(fileno(fp));
ferr = ferror(fp) | fclose(fp);
if (r < 0) {
@@ -2556,8 +2557,10 @@ static int depmod_output(struct depmod *depmod, FILE *out)
}
}
- if (dfd >= 0)
+ if (dfd >= 0) {
+ fsync(dfd);
close(dfd);
+ }
return err;
}
--
2.19.1

View File

@ -1,6 +1,6 @@
Name: kmod
Version: 29
Release: 1
Release: 2
Summary: Kernel module management
# GPLv2+ is used by programs, LGPLv2+ is used for libraries.
License: GPLv2+ and LGPLv2+
@ -10,10 +10,9 @@ Source1: weak-modules
Source2: depmod.conf.dist
Patch1: 0001-libkmod-module-check-new_from_name-return-value-in-g.patch
Patch2: 0002-kmod-20-8-depmod-Don-t-unlinkat-orig-depfile-and-add-fsync.patch
Patch3: 0003-Module-replace-the-module-with-new-module.patch
Patch4: 0004-Module-suspend-the-module-by-rmmod-r-option.patch
Patch5: 0005-don-t-check-module-s-refcnt-when-rmmod-with-r.patch
Patch2: 0002-Module-replace-the-module-with-new-module.patch
Patch3: 0003-Module-suspend-the-module-by-rmmod-r-option.patch
Patch4: 0004-don-t-check-module-s-refcnt-when-rmmod-with-r.patch
BuildRequires: gcc chrpath zlib-devel xz-devel libxslt openssl-devel
@ -108,6 +107,9 @@ install -m 0644 %{SOURCE2} $RPM_BUILD_ROOT%{_sysconfdir}/depmod.d/dist.conf
%doc TODO NEWS README
%changelog
* Thu Dec 9 2021 Jiangfeng Xiao <xiaojiangfeng@huawei.com> - 29-2
- kmod: revert "depmod: Do not unlinkat orig depfile and add fync"
* Fri Dec 3 2021 zhouwenpei <zhouwenpei1@huawei.com> - 29-1
- update kmod to 29