projects
/
platform
/
kernel
/
linux-starfive.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
cdd89d4
)
shmem: include header file to declare swap_info
author
Miaohe Lin
<linmiaohe@huawei.com>
Thu, 2 Sep 2021 21:54:15 +0000
(14:54 -0700)
committer
Linus Torvalds
<torvalds@linux-foundation.org>
Fri, 3 Sep 2021 16:58:11 +0000
(09:58 -0700)
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>
mm/shmem.c
patch
|
blob
|
history
diff --git
a/mm/shmem.c
b/mm/shmem.c
index
c4087f7
..
f841c7a
100644
(file)
--- 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,