linux-mm.kvack.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] mm:remove useless code
@ 2020-12-23  7:13 hui yang
  2020-12-23  7:32 ` Hao Lee
  2020-12-23  7:43 ` Souptick Joarder
  0 siblings, 2 replies; 3+ messages in thread
From: hui yang @ 2020-12-23  7:13 UTC (permalink / raw)
  To: akpm; +Cc: linux-mm, YangHui

From: YangHui <yanghui.def@gmail.com>

remove useless code

Signed-off-by: YangHui <yanghui.def@gmail.com>
---
 mm/vmscan.c | 5 ++---
 1 file changed, 2 insertions(+), 3 deletions(-)

diff --git a/mm/vmscan.c b/mm/vmscan.c
index 257cba7..af1d176 100644
--- a/mm/vmscan.c
+++ b/mm/vmscan.c
@@ -1234,8 +1234,8 @@ static unsigned int shrink_page_list(struct list_head *page_list,
 		 * Try to allocate it some swap space here.
 		 * Lazyfree page could be freed directly
 		 */
-		if (PageAnon(page) && PageSwapBacked(page)) {
-			if (!PageSwapCache(page)) {
+		if (PageAnon(page) && PageSwapBacked(page) &&
+			!PageSwapCache(page)) {
 				if (!(sc->gfp_mask & __GFP_IO))
 					goto keep_locked;
 				if (PageTransHuge(page)) {
@@ -1270,7 +1270,6 @@ static unsigned int shrink_page_list(struct list_head *page_list,
 
 				/* Adding to swap updated mapping */
 				mapping = page_mapping(page);
-			}
 		} else if (unlikely(PageTransHuge(page))) {
 			/* Split file THP */
 			if (split_huge_page_to_list(page, page_list))
-- 
2.7.4



^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2020-12-23  7:43 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-12-23  7:13 [PATCH] mm:remove useless code hui yang
2020-12-23  7:32 ` Hao Lee
2020-12-23  7:43 ` Souptick Joarder

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox