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]
Date: Thu, 18 Apr 2024 10:42:43 +0800
From: Kairui Song <ryncsn@...il.com>
To: Matthew Wilcox <willy@...radead.org>
Cc: linux-mm@...ck.org, Andrew Morton <akpm@...ux-foundation.org>, 
	"Huang, Ying" <ying.huang@...el.com>, Chris Li <chrisl@...nel.org>, 
	Barry Song <v-songbaohua@...o.com>, Ryan Roberts <ryan.roberts@....com>, Neil Brown <neilb@...e.de>, 
	Minchan Kim <minchan@...nel.org>, Hugh Dickins <hughd@...gle.com>, 
	David Hildenbrand <david@...hat.com>, Yosry Ahmed <yosryahmed@...gle.com>, linux-fsdevel@...r.kernel.org, 
	linux-kernel@...r.kernel.org, Ryusuke Konishi <konishi.ryusuke@...il.com>, 
	linux-nilfs@...r.kernel.org
Subject: Re: [PATCH 2/8] nilfs2: drop usage of page_index

On Thu, Apr 18, 2024 at 12:14 AM Matthew Wilcox <willy@...radead.org> wrote:
>
> On Thu, Apr 18, 2024 at 12:08:36AM +0800, Kairui Song wrote:
> > +++ b/fs/nilfs2/bmap.c
> > @@ -453,8 +453,7 @@ __u64 nilfs_bmap_data_get_key(const struct nilfs_bmap *bmap,
> >       struct buffer_head *pbh;
> >       __u64 key;
> >
> > -     key = page_index(bh->b_page) << (PAGE_SHIFT -
> > -                                      bmap->b_inode->i_blkbits);
> > +     key = bh->b_page->index << (PAGE_SHIFT - bmap->b_inode->i_blkbits);
>
> I'd prefer this were
>
>         key = bh->b_folio->index << (PAGE_SHIFT - bmap->b_inode->i_blkbits);
>
> (pages only have a ->index field for historical reasons; I'm trying to
> get rid of it)
>

Good suggestion! For easier review I just copied the original logic
from page_index, I will update with folio conventions in V2.

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ