Skip to content

Commit dfe5c51

Browse files
MiaoheLintorvalds
authored andcommitted
mm/huge_memory.c: use page->deferred_list
Now that we can represent the location of ->deferred_list instead of ->mapping + ->index, make use of it to improve readability. Link: https://lkml.kernel.org/r/[email protected] Signed-off-by: Miaohe Lin <[email protected]> Reviewed-by: Yang Shi <[email protected]> Reviewed-by: David Hildenbrand <[email protected]> Cc: Alexey Dobriyan <[email protected]> Cc: "Aneesh Kumar K . V" <[email protected]> Cc: Anshuman Khandual <[email protected]> Cc: Hugh Dickins <[email protected]> Cc: Johannes Weiner <[email protected]> Cc: Kirill A. Shutemov <[email protected]> Cc: Matthew Wilcox <[email protected]> Cc: Minchan Kim <[email protected]> Cc: Ralph Campbell <[email protected]> Cc: Rik van Riel <[email protected]> Cc: Song Liu <[email protected]> Cc: William Kucharski <[email protected]> Cc: Zi Yan <[email protected]> Cc: Mike Kravetz <[email protected]> Signed-off-by: Andrew Morton <[email protected]> Signed-off-by: Linus Torvalds <[email protected]>
1 parent b2bd53f commit dfe5c51

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

mm/huge_memory.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2870,7 +2870,7 @@ static unsigned long deferred_split_scan(struct shrinker *shrink,
28702870
spin_lock_irqsave(&ds_queue->split_queue_lock, flags);
28712871
/* Take pin on all head pages to avoid freeing them under us */
28722872
list_for_each_safe(pos, next, &ds_queue->split_queue) {
2873-
page = list_entry((void *)pos, struct page, mapping);
2873+
page = list_entry((void *)pos, struct page, deferred_list);
28742874
page = compound_head(page);
28752875
if (get_page_unless_zero(page)) {
28762876
list_move(page_deferred_list(page), &list);
@@ -2885,7 +2885,7 @@ static unsigned long deferred_split_scan(struct shrinker *shrink,
28852885
spin_unlock_irqrestore(&ds_queue->split_queue_lock, flags);
28862886

28872887
list_for_each_safe(pos, next, &list) {
2888-
page = list_entry((void *)pos, struct page, mapping);
2888+
page = list_entry((void *)pos, struct page, deferred_list);
28892889
if (!trylock_page(page))
28902890
goto next;
28912891
/* split_huge_page() removes page from list on success */

0 commit comments

Comments
 (0)