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
| ||
|
Date: Mon, 28 Sep 2020 15:20:48 -0700 From: Ralph Campbell <rcampbell@...dia.com> To: Christoph Hellwig <hch@....de> CC: <linux-mm@...ck.org>, <kvm-ppc@...r.kernel.org>, <nouveau@...ts.freedesktop.org>, <linux-kernel@...r.kernel.org>, Dan Williams <dan.j.williams@...el.com>, Ira Weiny <ira.weiny@...el.com>, Matthew Wilcox <willy@...radead.org>, Jerome Glisse <jglisse@...hat.com>, John Hubbard <jhubbard@...dia.com>, Alistair Popple <apopple@...dia.com>, Jason Gunthorpe <jgg@...dia.com>, Bharata B Rao <bharata@...ux.ibm.com>, Zi Yan <ziy@...dia.com>, "Kirill A . Shutemov" <kirill.shutemov@...ux.intel.com>, Yang Shi <yang.shi@...ux.alibaba.com>, Paul Mackerras <paulus@...abs.org>, Ben Skeggs <bskeggs@...hat.com>, Andrew Morton <akpm@...ux-foundation.org> Subject: Re: [PATCH 1/2] ext4/xfs: add page refcount helper On 9/25/20 11:35 PM, Christoph Hellwig wrote: > On Fri, Sep 25, 2020 at 01:44:41PM -0700, Ralph Campbell wrote: >> error = ___wait_var_event(&page->_refcount, >> - atomic_read(&page->_refcount) == 1, >> + dax_layout_is_idle_page(page), >> TASK_INTERRUPTIBLE, 0, 0, >> ext4_wait_dax_page(ei)); > >> +++ b/fs/xfs/xfs_file.c >> @@ -750,7 +750,7 @@ xfs_break_dax_layouts( >> >> *retry = true; >> return ___wait_var_event(&page->_refcount, >> - atomic_read(&page->_refcount) == 1, TASK_INTERRUPTIBLE, >> + dax_layout_is_idle_page(page), TASK_INTERRUPTIBLE, >> 0, 0, xfs_wait_dax_page(inode)); >> } > > I still think a litte helper macro would be nice here: > > #define dax_wait_page(_inode, _page, _wait_cb) \ > ___wait_var_event(&(_page)->_refcount, \ > atomic_read(&(_page)->_refcount) == 1, \ > TASK_INTERRUPTIBLE, dax_layout_is_idle_page(_page), \ > TASK_INTERRUPTIBLE, 0, 0, _wait_cb(_inode)); OK, I'll add it in v3.
Powered by blists - more mailing lists