mm/page_reporting: drop stale list head check in page_reporting_cycle
Subsystems (2)
PATCH v2 1/1 mm/page_reporting: drop stale list head check in page_reporting_cycle
list_for_each_entry_safe() guarantees that we will never stumble over the list head; "&page->lru != list" will always evaluate to true. Let's simplify.
Signed-off-by Wei Yang <[email protected]>
Reviewed-by David Hildenbrand <[email protected]>
--- mm/page_reporting.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
mm/page_reporting.c +1 -1
@@ -178,7 +178,7 @@ page_reporting_cycle(struct page_reporting_dev_info *prdev, struct zone *zone,* the new head of the free list before we release the * zone lock. */ -if (&page->lru != list && !list_is_first (&page->lru, list)) +if (!list_is_first (&page->lru, list))list_rotate_to_front (&page->lru, list);/* release lock before waiting on report processing */
Signature · 1 line
2.20.1 (Apple Git-117)
Quoted 3 lines · Wei Yang
list_for_each_entry_safe()guarantees that we will never stumble over the list head; "&page->lru!= list" will always evaluate to true. Let's simplify.
[[email protected]: Changelog refine.]
Quoted 22 lines
Signed-off-by Wei Yang <[email protected]>Reviewed-by David Hildenbrand <[email protected]>---
mm/page_reporting.c| 2 +-1 file changed, 1 insertion(+), 1 deletion(-)mm/page_reporting.c +1
-1@@ -178,7 +178,7 @@ page_reporting_cycle(struct page_reporting_dev_info *prdev, struct zone *zone,* the new head of the free list before we release the * zone lock. */ -if (&page->lru != list && !list_is_first (&page->lru, list)) +if (!list_is_first (&page->lru, list))list_rotate_to_front (&page->lru, list);/* release lock before waiting on report processing */ Signature · 1 line
2.20.1 (Apple Git-117)
Signature · 2 lines
Wei Yang Help you, Help me
Quoted 16 lines · Wei Yang
list_for_each_entry_safe()guarantees that we will never stumble over the list head; "&page->lru!= list" will always evaluate to true. Let's simplify.Signed-off-by Wei Yang <[email protected]>Reviewed-by David Hildenbrand <[email protected]>--- mm/page_reporting.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)mm/page_reporting.c +0
-0
mm/page_reporting.c page_reporting_cycle(struct page_reporting_dev_info *prdev, struct zone *zone, · line 184
Quoted 8 lines
mm/page_reporting.c +1
-1@@ -178,7 +178,7 @@ page_reporting_cycle(struct page_reporting_dev_info *prdev, struct zone *zone,* the new head of the free list before we release the * zone lock. */ -if (&page->lru != list && !list_is_first (&page->lru, list)) +if (!list_is_first (&page->lru, list))list_rotate_to_front (&page->lru, list);/* release lock before waiting on report processing */
Reviewed-by Alexander Duyck <[email protected]>