diff options
-rw-r--r-- | mm/huge_memory.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/mm/huge_memory.c b/mm/huge_memory.c index 87ab9b8f56b5..529cf36b7edb 100644 --- a/mm/huge_memory.c +++ b/mm/huge_memory.c | |||
@@ -2783,11 +2783,13 @@ static unsigned long deferred_split_scan(struct shrinker *shrink, | |||
2783 | 2783 | ||
2784 | list_for_each_safe(pos, next, &list) { | 2784 | list_for_each_safe(pos, next, &list) { |
2785 | page = list_entry((void *)pos, struct page, mapping); | 2785 | page = list_entry((void *)pos, struct page, mapping); |
2786 | lock_page(page); | 2786 | if (!trylock_page(page)) |
2787 | goto next; | ||
2787 | /* split_huge_page() removes page from list on success */ | 2788 | /* split_huge_page() removes page from list on success */ |
2788 | if (!split_huge_page(page)) | 2789 | if (!split_huge_page(page)) |
2789 | split++; | 2790 | split++; |
2790 | unlock_page(page); | 2791 | unlock_page(page); |
2792 | next: | ||
2791 | put_page(page); | 2793 | put_page(page); |
2792 | } | 2794 | } |
2793 | 2795 | ||