From: Miaohe Lin Date: Thu, 2 Sep 2021 21:54:15 +0000 (-0700) Subject: shmem: include header file to declare swap_info X-Git-Tag: v5.15~378^2~126 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=86a2f3f2d99e9765d13a55ee2e4364deb6cdf794;p=platform%2Fkernel%2Flinux-starfive.git shmem: include header file to declare swap_info It's bad to extern swap_info[] in .c. Include corresponding header file instead. Link: https://lkml.kernel.org/r/20210812120350.49801-5-linmiaohe@huawei.com Signed-off-by: Miaohe Lin Cc: Hugh Dickins Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds --- diff --git a/mm/shmem.c b/mm/shmem.c index c4087f7..f841c7a 100644 --- a/mm/shmem.c +++ b/mm/shmem.c @@ -38,6 +38,7 @@ #include #include #include +#include static struct vfsmount *shm_mnt; @@ -1152,8 +1153,6 @@ static void shmem_evict_inode(struct inode *inode) clear_inode(inode); } -extern struct swap_info_struct *swap_info[]; - static int shmem_find_swap_entries(struct address_space *mapping, pgoff_t start, unsigned int nr_entries, struct page **entries, pgoff_t *indices,