]> git.ipfire.org Git - thirdparty/kernel/stable.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)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Sat, 1 Feb 2025 17:22:28 +0000 (18:22 +0100)
[ Upstream commit 2b2fc0be98a828cf33a88a28e9745e8599fb05cf ]

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>
Signed-off-by: Sasha Levin <sashal@kernel.org>
fs/file.c

index 40a7fc127f37a5646de1a2b36a9fb9be1bd729e2..975b1227a2f6d993c4477cc1843bdbe06d07d00d 100644 (file)
--- a/fs/file.c
+++ b/fs/file.c
@@ -21,6 +21,7 @@
 #include <linux/rcupdate.h>
 #include <linux/close_range.h>
 #include <net/sock.h>
+#include <linux/init_task.h>
 
 #include "internal.h"