mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
synced 2025-01-24 01:09:38 -05:00
mm/balloon_compaction: make balloon page compaction callbacks static
Since commit b1123ea6d3
("mm: balloon: use general non-lru movable page
feature"), these functions are called via balloon_aops callbacks. They're
not called directly outside this file. So make them static and clean up
the relevant code.
Signed-off-by: Miaohe Lin <linmiaohe@huawei.com>
Link: https://lore.kernel.org/r/20220125132221.2220-1-linmiaohe@huawei.com
Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
Reviewed-by: Muchun Song <songmuchun@bytedance.com>
This commit is contained in:
parent
6f84622db3
commit
504c1cabe3
2 changed files with 3 additions and 25 deletions
|
@ -80,12 +80,6 @@ static inline void balloon_devinfo_init(struct balloon_dev_info *balloon)
|
||||||
|
|
||||||
#ifdef CONFIG_BALLOON_COMPACTION
|
#ifdef CONFIG_BALLOON_COMPACTION
|
||||||
extern const struct address_space_operations balloon_aops;
|
extern const struct address_space_operations balloon_aops;
|
||||||
extern bool balloon_page_isolate(struct page *page,
|
|
||||||
isolate_mode_t mode);
|
|
||||||
extern void balloon_page_putback(struct page *page);
|
|
||||||
extern int balloon_page_migrate(struct address_space *mapping,
|
|
||||||
struct page *newpage,
|
|
||||||
struct page *page, enum migrate_mode mode);
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* balloon_page_insert - insert a page into the balloon's page list and make
|
* balloon_page_insert - insert a page into the balloon's page list and make
|
||||||
|
@ -155,22 +149,6 @@ static inline void balloon_page_delete(struct page *page)
|
||||||
list_del(&page->lru);
|
list_del(&page->lru);
|
||||||
}
|
}
|
||||||
|
|
||||||
static inline bool balloon_page_isolate(struct page *page)
|
|
||||||
{
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
|
|
||||||
static inline void balloon_page_putback(struct page *page)
|
|
||||||
{
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
|
|
||||||
static inline int balloon_page_migrate(struct page *newpage,
|
|
||||||
struct page *page, enum migrate_mode mode)
|
|
||||||
{
|
|
||||||
return 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
static inline gfp_t balloon_mapping_gfp_mask(void)
|
static inline gfp_t balloon_mapping_gfp_mask(void)
|
||||||
{
|
{
|
||||||
return GFP_HIGHUSER;
|
return GFP_HIGHUSER;
|
||||||
|
|
|
@ -203,7 +203,7 @@ EXPORT_SYMBOL_GPL(balloon_page_dequeue);
|
||||||
|
|
||||||
#ifdef CONFIG_BALLOON_COMPACTION
|
#ifdef CONFIG_BALLOON_COMPACTION
|
||||||
|
|
||||||
bool balloon_page_isolate(struct page *page, isolate_mode_t mode)
|
static bool balloon_page_isolate(struct page *page, isolate_mode_t mode)
|
||||||
|
|
||||||
{
|
{
|
||||||
struct balloon_dev_info *b_dev_info = balloon_page_device(page);
|
struct balloon_dev_info *b_dev_info = balloon_page_device(page);
|
||||||
|
@ -217,7 +217,7 @@ bool balloon_page_isolate(struct page *page, isolate_mode_t mode)
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
void balloon_page_putback(struct page *page)
|
static void balloon_page_putback(struct page *page)
|
||||||
{
|
{
|
||||||
struct balloon_dev_info *b_dev_info = balloon_page_device(page);
|
struct balloon_dev_info *b_dev_info = balloon_page_device(page);
|
||||||
unsigned long flags;
|
unsigned long flags;
|
||||||
|
@ -230,7 +230,7 @@ void balloon_page_putback(struct page *page)
|
||||||
|
|
||||||
|
|
||||||
/* move_to_new_page() counterpart for a ballooned page */
|
/* move_to_new_page() counterpart for a ballooned page */
|
||||||
int balloon_page_migrate(struct address_space *mapping,
|
static int balloon_page_migrate(struct address_space *mapping,
|
||||||
struct page *newpage, struct page *page,
|
struct page *newpage, struct page *page,
|
||||||
enum migrate_mode mode)
|
enum migrate_mode mode)
|
||||||
{
|
{
|
||||||
|
|
Loading…
Add table
Reference in a new issue