From: Miaohe Lin Date: Mon, 23 Aug 2021 23:59:11 +0000 (+1000) Subject: shmem: include header file to declare swap_info X-Git-Url: https://www.infradead.org/git/?a=commitdiff_plain;h=a7244343784bcb823f0165e629b33a7f4b92ccea;p=users%2Fjedix%2Flinux-maple.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: Stephen Rothwell --- diff --git a/mm/shmem.c b/mm/shmem.c index c4087f70c86cb..f841c7adb8b2d 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,