lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <CAHbLzkqX9E3NQiOmGxg5ovmjTqyMkeVPmS2pZYdmrhkfb+cT2g@mail.gmail.com>
Date:   Thu, 5 Aug 2021 10:34:42 -0700
From:   Yang Shi <shy828301@...il.com>
To:     Baolin Wang <baolin.wang@...ux.alibaba.com>
Cc:     Andrew Morton <akpm@...ux-foundation.org>,
        Linux MM <linux-mm@...ck.org>,
        Linux Kernel Mailing List <linux-kernel@...r.kernel.org>
Subject: Re: [PATCH 4/5] mm: migrate: Change to use bool type for 'page_was_mapped'

On Thu, Aug 5, 2021 at 8:06 AM Baolin Wang
<baolin.wang@...ux.alibaba.com> wrote:
>
> Change to use bool type for 'page_was_mapped' variable making it
> more readable.

Seems better to me. Reviewed-by: Yang Shi <shy828301@...il.com>

>
> Signed-off-by: Baolin Wang <baolin.wang@...ux.alibaba.com>
> ---
>  mm/migrate.c | 4 ++--
>  1 file changed, 2 insertions(+), 2 deletions(-)
>
> diff --git a/mm/migrate.c b/mm/migrate.c
> index 6f048a8..0ab364f 100644
> --- a/mm/migrate.c
> +++ b/mm/migrate.c
> @@ -957,7 +957,7 @@ static int __unmap_and_move(struct page *page, struct page *newpage,
>                                 int force, enum migrate_mode mode)
>  {
>         int rc = -EAGAIN;
> -       int page_was_mapped = 0;
> +       bool page_was_mapped = false;
>         struct anon_vma *anon_vma = NULL;
>         bool is_lru = !__PageMovable(page);
>
> @@ -1060,7 +1060,7 @@ static int __unmap_and_move(struct page *page, struct page *newpage,
>                 VM_BUG_ON_PAGE(PageAnon(page) && !PageKsm(page) && !anon_vma,
>                                 page);
>                 try_to_migrate(page, 0);
> -               page_was_mapped = 1;
> +               page_was_mapped = true;
>         }
>
>         if (!page_mapped(page))
> --
> 1.8.3.1
>
>

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ