diff mbox series

[4/5] initramfs: use do_utime() wrapper consistently

Message ID 20210922115222.8987-4-ddiss@suse.de (mailing list archive)
State New, archived
Headers show
Series [1/5] initramfs: move unnecessary memcmp from hot path | expand

Commit Message

David Disseldorp Sept. 22, 2021, 11:52 a.m. UTC
vfs_utimes() is called via the do_utime() wrapper everywhere except in
do_copy(). Make it consistent.

Signed-off-by: David Disseldorp <ddiss@suse.de>
---
 init/initramfs.c | 6 +-----
 1 file changed, 1 insertion(+), 5 deletions(-)
diff mbox series

Patch

diff --git a/init/initramfs.c b/init/initramfs.c
index 19b1c70446fc..7f809a1c8e89 100644
--- a/init/initramfs.c
+++ b/init/initramfs.c
@@ -378,13 +378,9 @@  static int __init do_name(void)
 static int __init do_copy(void)
 {
 	if (byte_count >= body_len) {
-		struct timespec64 t[2] = { };
 		if (xwrite(wfile, victim, body_len, &wfile_pos) != body_len)
 			error("write error");
-
-		t[0].tv_sec = mtime;
-		t[1].tv_sec = mtime;
-		vfs_utimes(&wfile->f_path, t);
+		do_utime(collected, mtime);
 
 		fput(wfile);
 		eat(body_len);