mirror of
https://github.com/hardkernel/linux.git
synced 2026-06-08 20:07:46 +09:00
ANDROID: adjust vendor hook to control blk_plug
We shouldn't hold lru_lock to proceed blk_finish_plug.
Fixes: 89fed37332 ("ANDROID: vendor hook to control blk_plug for shrink_lruvec")
Bug: 255471591
Change-Id: Ie9d9b0e4ee76b4735e802b2a202fbb79d0ae090e
Signed-off-by: Martin Liu <liumartin@google.com>
This commit is contained in:
@@ -2051,8 +2051,6 @@ shrink_inactive_list(unsigned long nr_to_scan, struct lruvec *lruvec,
|
|||||||
spin_lock_irq(&pgdat->lru_lock);
|
spin_lock_irq(&pgdat->lru_lock);
|
||||||
|
|
||||||
move_pages_to_lru(lruvec, &page_list);
|
move_pages_to_lru(lruvec, &page_list);
|
||||||
if (do_plug)
|
|
||||||
blk_finish_plug(&plug);
|
|
||||||
|
|
||||||
__mod_node_page_state(pgdat, NR_ISOLATED_ANON + file, -nr_taken);
|
__mod_node_page_state(pgdat, NR_ISOLATED_ANON + file, -nr_taken);
|
||||||
lru_note_cost(lruvec, file, stat.nr_pageout);
|
lru_note_cost(lruvec, file, stat.nr_pageout);
|
||||||
@@ -2064,6 +2062,9 @@ shrink_inactive_list(unsigned long nr_to_scan, struct lruvec *lruvec,
|
|||||||
|
|
||||||
spin_unlock_irq(&pgdat->lru_lock);
|
spin_unlock_irq(&pgdat->lru_lock);
|
||||||
|
|
||||||
|
if (do_plug)
|
||||||
|
blk_finish_plug(&plug);
|
||||||
|
|
||||||
mem_cgroup_uncharge_list(&page_list);
|
mem_cgroup_uncharge_list(&page_list);
|
||||||
free_unref_page_list(&page_list);
|
free_unref_page_list(&page_list);
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user