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:   Sun, 26 Apr 2020 22:55:40 -0700
From:   Christoph Hellwig <hch@...radead.org>
To:     Matthew Wilcox <willy@...radead.org>
Cc:     Guoqing Jiang <guoqing.jiang@...ud.ionos.com>,
        linux-fsdevel@...r.kernel.org, linux-kernel@...r.kernel.org,
        hch@...radead.org, david@...morbit.com,
        "Darrick J. Wong" <darrick.wong@...cle.com>,
        linux-xfs@...r.kernel.org
Subject: Re: [RFC PATCH 6/9] iomap: use set/clear_fs_page_private

On Sun, Apr 26, 2020 at 05:26:31PM -0700, Matthew Wilcox wrote:
> On Sun, Apr 26, 2020 at 11:49:22PM +0200, Guoqing Jiang wrote:
> > @@ -59,24 +59,18 @@ iomap_page_create(struct inode *inode, struct page *page)
> >  	 * migrate_page_move_mapping() assumes that pages with private data have
> >  	 * their count elevated by 1.
> >  	 */
> > -	get_page(page);
> > -	set_page_private(page, (unsigned long)iop);
> > -	SetPagePrivate(page);
> > -	return iop;
> > +	return (struct iomap_page *)set_fs_page_private(page, iop);
> >  }
> 
> This cast is unnecessary.  void * will be automatically cast to the
> appropriate pointer type.

I also find the pattern eather strange.  A:

	attach_page_private(page, iop);
	return iop;

explains the intent much better.

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ