linux-mm.kvack.org archive mirror
 help / color / mirror / Atom feed
From: Souptick Joarder <jrdr.linux@gmail.com>
To: hui yang <yanghui.def@gmail.com>
Cc: Andrew Morton <akpm@linux-foundation.org>, Linux-MM <linux-mm@kvack.org>
Subject: Re: [PATCH] mm:remove useless code
Date: Wed, 23 Dec 2020 13:13:41 +0530	[thread overview]
Message-ID: <CAFqt6zaxD+tabAx1CX=yTJK+t2X4imCJDmXu=rQeztOFzHk9gg@mail.gmail.com> (raw)
In-Reply-To: <1608707589-6067-1-git-send-email-yanghui.def@gmail.com>

On Wed, Dec 23, 2020 at 12:43 PM hui yang <yanghui.def@gmail.com> wrote:
>
> From: YangHui <yanghui.def@gmail.com>
>
> remove useless code

Change logs need to be more descriptive.

>
> 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)) {

This will change the original behaviour of the code.

>                                 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
>
>


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

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

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='CAFqt6zaxD+tabAx1CX=yTJK+t2X4imCJDmXu=rQeztOFzHk9gg@mail.gmail.com' \
    --to=jrdr.linux@gmail.com \
    --cc=akpm@linux-foundation.org \
    --cc=linux-mm@kvack.org \
    --cc=yanghui.def@gmail.com \
    /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