Commit 7c363b8c authored by Adrian Bunk's avatar Adrian Bunk Committed by Linus Torvalds

mm/swapfile.c: make code static

This patch makes the following needlessly global code static:
 - swap_lock
 - nr_swapfiles
 - struct swap_list
Signed-off-by: default avatarAdrian Bunk <bunk@kernel.org>
Reviewed-by: default avatarKOSAKI Motohiro <kosaki.motohiro@jp.fujitsu.com>
Signed-off-by: default avatarAndrew Morton <akpm@linux-foundation.org>
Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
parent 15f59ada
...@@ -237,7 +237,6 @@ extern struct page *swapin_readahead(swp_entry_t, gfp_t, ...@@ -237,7 +237,6 @@ extern struct page *swapin_readahead(swp_entry_t, gfp_t,
/* linux/mm/swapfile.c */ /* linux/mm/swapfile.c */
extern long total_swap_pages; extern long total_swap_pages;
extern unsigned int nr_swapfiles;
extern void si_swapinfo(struct sysinfo *); extern void si_swapinfo(struct sysinfo *);
extern swp_entry_t get_swap_page(void); extern swp_entry_t get_swap_page(void);
extern swp_entry_t get_swap_page_of_type(int); extern swp_entry_t get_swap_page_of_type(int);
...@@ -254,8 +253,6 @@ extern int can_share_swap_page(struct page *); ...@@ -254,8 +253,6 @@ extern int can_share_swap_page(struct page *);
extern int remove_exclusive_swap_page(struct page *); extern int remove_exclusive_swap_page(struct page *);
struct backing_dev_info; struct backing_dev_info;
extern spinlock_t swap_lock;
/* linux/mm/thrash.c */ /* linux/mm/thrash.c */
extern struct mm_struct * swap_token_mm; extern struct mm_struct * swap_token_mm;
extern void grab_swap_token(void); extern void grab_swap_token(void);
......
...@@ -33,8 +33,8 @@ ...@@ -33,8 +33,8 @@
#include <asm/tlbflush.h> #include <asm/tlbflush.h>
#include <linux/swapops.h> #include <linux/swapops.h>
DEFINE_SPINLOCK(swap_lock); static DEFINE_SPINLOCK(swap_lock);
unsigned int nr_swapfiles; static unsigned int nr_swapfiles;
long total_swap_pages; long total_swap_pages;
static int swap_overflow; static int swap_overflow;
static int least_priority; static int least_priority;
...@@ -44,7 +44,7 @@ static const char Unused_file[] = "Unused swap file entry "; ...@@ -44,7 +44,7 @@ static const char Unused_file[] = "Unused swap file entry ";
static const char Bad_offset[] = "Bad swap offset entry "; static const char Bad_offset[] = "Bad swap offset entry ";
static const char Unused_offset[] = "Unused swap offset entry "; static const char Unused_offset[] = "Unused swap offset entry ";
struct swap_list_t swap_list = {-1, -1}; static struct swap_list_t swap_list = {-1, -1};
static struct swap_info_struct swap_info[MAX_SWAPFILES]; static struct swap_info_struct swap_info[MAX_SWAPFILES];
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment