Message ID | 20241217071836.2634868-1-zhangkunbo@huawei.com (mailing list archive) |
---|---|
State | New |
Headers | show |
Series | [-next] fs: fix missing declaration of init_files | expand |
On Tue, 17 Dec 2024 07:18:36 +0000, Zhang Kunbo wrote: > 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? > > Applied to the vfs.fixes branch of the vfs/vfs.git tree. Patches in the vfs.fixes branch should appear in linux-next soon. Please report any outstanding bugs that were missed during review in a new review to the original patch series allowing us to drop it. It's encouraged to provide Acked-bys and Reviewed-bys even though the patch has now been applied. If possible patch trailers will be updated. Note that commit hashes shown below are subject to change due to rebase, trailer updates or similar. If in doubt, please check the listed branch. tree: https://git.kernel.org/pub/scm/linux/kernel/git/vfs/vfs.git branch: vfs.fixes [1/1] fs: fix missing declaration of init_files https://git.kernel.org/vfs/vfs/c/2b2fc0be98a8
diff --git a/fs/file.c b/fs/file.c index fb1011cf6b4a..25c6e53b03f8 100644 --- 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"
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> --- fs/file.c | 1 + 1 file changed, 1 insertion(+)