linux-mm.kvack.org archive mirror
 help / color / mirror / Atom feed
From: hui yang <yanghui.def@gmail.com>
To: akpm@linux-foundation.org
Cc: linux-mm@kvack.org, YangHui <yanghui.def@gmail.com>
Subject: [PATCH] mm:remove useless code
Date: Wed, 23 Dec 2020 15:13:09 +0800	[thread overview]
Message-ID: <1608707589-6067-1-git-send-email-yanghui.def@gmail.com> (raw)

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



             reply	other threads:[~2020-12-23  7:13 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-12-23  7:13 hui yang [this message]
2020-12-23  7:32 ` Hao Lee
2020-12-23  7:43 ` Souptick Joarder

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1608707589-6067-1-git-send-email-yanghui.def@gmail.com \
    --to=yanghui.def@gmail.com \
    --cc=akpm@linux-foundation.org \
    --cc=linux-mm@kvack.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox