Commit cb16556d authored by Yang Shi's avatar Yang Shi Committed by Linus Torvalds

mm/vmscan.c: remove unused scan_control parameter from pageout()

Since lumpy reclaim was removed in v3.5 scan_control is not used by
may_write_to_{queue|inode} and pageout() anymore, remove the unused
parameter.

Link: http://lkml.kernel.org/r/1570124498-19300-1-git-send-email-yang.shi@linux.alibaba.comSigned-off-by: default avatarYang Shi <yang.shi@linux.alibaba.com>
Acked-by: default avatarDavid Rientjes <rientjes@google.com>
Acked-by: default avatarMichal Hocko <mhocko@suse.com>
Cc: Mel Gorman <mgorman@techsingularity.net>
Cc: Johannes Weiner <hannes@cmpxchg.org>
Signed-off-by: default avatarAndrew Morton <akpm@linux-foundation.org>
Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
parent f87bccde
...@@ -775,7 +775,7 @@ static inline int is_page_cache_freeable(struct page *page) ...@@ -775,7 +775,7 @@ static inline int is_page_cache_freeable(struct page *page)
return page_count(page) - page_has_private(page) == 1 + page_cache_pins; return page_count(page) - page_has_private(page) == 1 + page_cache_pins;
} }
static int may_write_to_inode(struct inode *inode, struct scan_control *sc) static int may_write_to_inode(struct inode *inode)
{ {
if (current->flags & PF_SWAPWRITE) if (current->flags & PF_SWAPWRITE)
return 1; return 1;
...@@ -823,8 +823,7 @@ typedef enum { ...@@ -823,8 +823,7 @@ typedef enum {
* pageout is called by shrink_page_list() for each dirty page. * pageout is called by shrink_page_list() for each dirty page.
* Calls ->writepage(). * Calls ->writepage().
*/ */
static pageout_t pageout(struct page *page, struct address_space *mapping, static pageout_t pageout(struct page *page, struct address_space *mapping)
struct scan_control *sc)
{ {
/* /*
* If the page is dirty, only perform writeback if that write * If the page is dirty, only perform writeback if that write
...@@ -860,7 +859,7 @@ static pageout_t pageout(struct page *page, struct address_space *mapping, ...@@ -860,7 +859,7 @@ static pageout_t pageout(struct page *page, struct address_space *mapping,
} }
if (mapping->a_ops->writepage == NULL) if (mapping->a_ops->writepage == NULL)
return PAGE_ACTIVATE; return PAGE_ACTIVATE;
if (!may_write_to_inode(mapping->host, sc)) if (!may_write_to_inode(mapping->host))
return PAGE_KEEP; return PAGE_KEEP;
if (clear_page_dirty_for_io(page)) { if (clear_page_dirty_for_io(page)) {
...@@ -1394,7 +1393,7 @@ static unsigned long shrink_page_list(struct list_head *page_list, ...@@ -1394,7 +1393,7 @@ static unsigned long shrink_page_list(struct list_head *page_list,
* starts and then write it out here. * starts and then write it out here.
*/ */
try_to_unmap_flush_dirty(); try_to_unmap_flush_dirty();
switch (pageout(page, mapping, sc)) { switch (pageout(page, mapping)) {
case PAGE_KEEP: case PAGE_KEEP:
goto keep_locked; goto keep_locked;
case PAGE_ACTIVATE: case PAGE_ACTIVATE:
......
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