VisionFive2 Linux kernel

StarFive Tech Linux Kernel for VisionFive (JH7110) boards (mirror)

More than 9999 Commits   32 Branches   54 Tags
author: Barret Rhoden <brho@google.com> 2020-09-04 09:53:32 -0400 committer: Linus Torvalds <torvalds@linux-foundation.org> 2020-09-04 09:16:58 -0700 commit: 7b81ce7cdcef3a3ae71eb3fb863433c646b4a2f4 parent: 59126901f200f5fc907153468b03c64e0081b6e6
Commit Summary:
init: fix error check in clean_path()
Diffstat:
1 file changed, 1 insertion, 1 deletion
diff --git a/init/initramfs.c b/init/initramfs.c
index e6dbfb767057..1f97c0328a7a 100644
--- a/init/initramfs.c
+++ b/init/initramfs.c
@@ -297,7 +297,7 @@ static void __init clean_path(char *path, umode_t fmode)
 {
 	struct kstat st;
 
-	if (init_stat(path, &st, AT_SYMLINK_NOFOLLOW) &&
+	if (!init_stat(path, &st, AT_SYMLINK_NOFOLLOW) &&
 	    (st.mode ^ fmode) & S_IFMT) {
 		if (S_ISDIR(st.mode))
 			init_rmdir(path);