From e827d00a709d79032a10953cb9ca80a8b77a77ab Mon Sep 17 00:00:00 2001 From: Greg Kroah-Hartman Date: Mon, 8 Mar 2021 09:54:24 +0100 Subject: [PATCH] ANDROID: GKI: hack up fs/sysfs/file.c to prevent GENKSYMS change In commit cb1f69d53ac8 ("sysfs: Add sysfs_emit and sysfs_emit_at to format sysfs output") in 4.19.179, a #include addition is added to the fs/sysfs/file.c file, before sysfs.h is included in the build. This ends up causing a previously "UNKNOWN" symbol type definition of struct vm_operations_struct to become "known" which propagates to a CRC change for some sysfs symbol definitions. To prevent all this mess, add a simple #ifndef to prevent the mm.h file from being included when running the symbol tool, and all is fine. Bug: 161946584 Signed-off-by: Greg Kroah-Hartman Change-Id: Ibcc22bedc4f39d2ef49a52ebd7962a8dba5b0583 --- fs/sysfs/file.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/fs/sysfs/file.c b/fs/sysfs/file.c index 5166eb40917d..57d90b7b0d8e 100644 --- a/fs/sysfs/file.c +++ b/fs/sysfs/file.c @@ -15,7 +15,9 @@ #include #include #include +#ifndef __GENKSYMS__ #include +#endif #include "sysfs.h" #include "../kernfs/kernfs-internal.h"