mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-29 11:11:45 -04:00
mm: move inc_zone_page_state(NR_ISOLATED) to just isolated place
Christoph pointed out inc_zone_page_state(NR_ISOLATED) should be placed in right after isolate_page(). This patch does it. Reviewed-by: Christoph Lameter <[email protected]> Signed-off-by: KOSAKI Motohiro <[email protected]> Signed-off-by: Andrew Morton <[email protected]> Signed-off-by: Linus Torvalds <[email protected]>
This commit is contained in:
parent
ee32398fda
commit
6d9c285a63
3 changed files with 11 additions and 8 deletions
12
mm/migrate.c
12
mm/migrate.c
|
|
@ -746,13 +746,6 @@ int migrate_pages(struct list_head *from,
|
|||
struct page *page2;
|
||||
int swapwrite = current->flags & PF_SWAPWRITE;
|
||||
int rc;
|
||||
unsigned long flags;
|
||||
|
||||
local_irq_save(flags);
|
||||
list_for_each_entry(page, from, lru)
|
||||
__inc_zone_page_state(page, NR_ISOLATED_ANON +
|
||||
page_is_file_cache(page));
|
||||
local_irq_restore(flags);
|
||||
|
||||
if (!swapwrite)
|
||||
current->flags |= PF_SWAPWRITE;
|
||||
|
|
@ -878,8 +871,11 @@ static int do_move_page_to_node_array(struct mm_struct *mm,
|
|||
goto put_and_set;
|
||||
|
||||
err = isolate_lru_page(page);
|
||||
if (!err)
|
||||
if (!err) {
|
||||
list_add_tail(&page->lru, &pagelist);
|
||||
inc_zone_page_state(page, NR_ISOLATED_ANON +
|
||||
page_is_file_cache(page));
|
||||
}
|
||||
put_and_set:
|
||||
/*
|
||||
* Either remove the duplicate refcount from
|
||||
|
|
|
|||
Loading…
Reference in a new issue