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: <64e96f3a-b9a5-49d5-9705-46d507fab3bb@intel.com>
Date:   Fri, 22 Sep 2023 11:01:12 +0800
From:   "Yin, Fengwei" <fengwei.yin@...el.com>
To:     Minjie Du <duminjie@...o.com>,
        "Matthew Wilcox (Oracle)" <willy@...radead.org>,
        Andrew Morton <akpm@...ux-foundation.org>,
        "open list:PAGE CACHE" <linux-fsdevel@...r.kernel.org>,
        "open list:MEMORY MANAGEMENT" <linux-mm@...ck.org>,
        open list <linux-kernel@...r.kernel.org>
CC:     <opensource.kernel@...o.com>
Subject: Re: [PATCH v1] mm/filemap: increase usage of folio_next_index()
 helper



On 9/21/2023 4:15 PM, Minjie Du wrote:
> Simplify code pattern of 'folio->index + folio_nr_pages(folio)' by using
> the existing helper folio_next_index() in filemap_map_pages().
> 
> Signed-off-by: Minjie Du <duminjie@...o.com>
Reviewed-by: Yin Fengwei <fengwei.yin@...el.com>


Regards
Yin, Fengwei

> ---
>  mm/filemap.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/mm/filemap.c b/mm/filemap.c
> index 4ea4387053e8..f8d0b97f9e94 100644
> --- a/mm/filemap.c
> +++ b/mm/filemap.c
> @@ -3591,7 +3591,7 @@ vm_fault_t filemap_map_pages(struct vm_fault *vmf,
>  		addr += (xas.xa_index - last_pgoff) << PAGE_SHIFT;
>  		vmf->pte += xas.xa_index - last_pgoff;
>  		last_pgoff = xas.xa_index;
> -		end = folio->index + folio_nr_pages(folio) - 1;
> +		end = folio_next_index(folio) - 1;
>  		nr_pages = min(end, end_pgoff) - xas.xa_index + 1;
>  
>  		if (!folio_test_large(folio))

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ