]> git.ipfire.org Git - thirdparty/linux.git/commitdiff
fs: fix missing declaration of init_files
authorZhang Kunbo <zhangkunbo@huawei.com>
Tue, 17 Dec 2024 07:18:36 +0000 (07:18 +0000)
committerChristian Brauner <brauner@kernel.org>
Tue, 17 Dec 2024 12:38:46 +0000 (13:38 +0100)
fs/file.c should include include/linux/init_task.h  for
 declaration of init_files. This fixes the sparse warning:

fs/file.c:501:21: warning: symbol 'init_files' was not declared. Should it be static?

Signed-off-by: Zhang Kunbo <zhangkunbo@huawei.com>
Link: https://lore.kernel.org/r/20241217071836.2634868-1-zhangkunbo@huawei.com
Signed-off-by: Christian Brauner <brauner@kernel.org>
fs/file.c

index fb1011cf6b4a69451fe90430c5eacebbe845849c..25c6e53b03f8fddad147dd879d330350581ce5af 100644 (file)
--- a/fs/file.c
+++ b/fs/file.c
@@ -22,6 +22,7 @@
 #include <linux/close_range.h>
 #include <linux/file_ref.h>
 #include <net/sock.h>
+#include <linux/init_task.h>
 
 #include "internal.h"