lkml.org 
[lkml]   [2021]   [Aug]   [12]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
From
Subject[PATCH 4/4] shmem: include header file to declare swap_info
Date
It's bad to extern swap_info[] in .c. Include corresponding header
file instead.

Signed-off-by: Miaohe Lin <linmiaohe@huawei.com>
---
mm/shmem.c | 3 +--
1 file changed, 1 insertion(+), 2 deletions(-)

diff --git a/mm/shmem.c b/mm/shmem.c
index ccef5fad0049..b9cebf074367 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,
--
2.23.0
\
 
 \ /
  Last update: 2021-08-12 14:04    [W:0.035 / U:0.112 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site