summaryrefslogtreecommitdiffstats
path: root/mm/shmem.c
diff options
context:
space:
mode:
authorMiaohe Lin <linmiaohe@huawei.com>2021-09-02 14:54:15 -0700
committerLinus Torvalds <torvalds@linux-foundation.org>2021-09-03 09:58:11 -0700
commit86a2f3f2d99e9765d13a55ee2e4364deb6cdf794 (patch)
tree9c75cfc2b213df6523c41f01149f91160dcf9ad4 /mm/shmem.c
parentcdd89d4cb6507f123f6ecbfe51050e9a9844c2ab (diff)
downloadlinux-stable-86a2f3f2d99e9765d13a55ee2e4364deb6cdf794.tar.gz
linux-stable-86a2f3f2d99e9765d13a55ee2e4364deb6cdf794.tar.bz2
linux-stable-86a2f3f2d99e9765d13a55ee2e4364deb6cdf794.zip
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 <linmiaohe@huawei.com> Cc: Hugh Dickins <hughd@google.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'mm/shmem.c')
-rw-r--r--mm/shmem.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/mm/shmem.c b/mm/shmem.c
index c4087f70c86c..f841c7adb8b2 100644
--- a/mm/shmem.c
+++ b/mm/shmem.c
@@ -38,6 +38,7 @@
#include <linux/hugetlb.h>
#include <linux/frontswap.h>
#include <linux/fs_parser.h>
+#include <linux/swapfile.h>
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,