From: William Kucharski <william.kucharski@oracle.com>
To: p.jaroszynski@gmail.com
Cc: Alexander Viro <viro@zeniv.linux.org.uk>,
Christoph Hellwig <hch@lst.de>,
linux-fsdevel@vger.kernel.org, linux-mm@kvack.org,
Piotr Jaroszynski <pjaroszynski@nvidia.com>
Subject: Re: [PATCH v2] iomap: get/put the page in iomap_page_create/release()
Date: Thu, 15 Nov 2018 14:07:11 -0700 [thread overview]
Message-ID: <96C997D3-DE5F-4553-9D35-C517EC4AF510@oracle.com> (raw)
In-Reply-To: <20181115184140.1388751-1-pjaroszynski@nvidia.com>
The V2 fixes look good to me.
William Kucharski
> On Nov 15, 2018, at 11:41 AM, p.jaroszynski@gmail.com wrote:
>
> Fixes: 82cb14175e7d ("xfs: add support for sub-pagesize writeback without buffer_heads")
> Signed-off-by: Piotr Jaroszynski <pjaroszynski@nvidia.com>
> Reviewed-by: Christoph Hellwig <hch@lst.de>
> ---
> fs/iomap.c | 7 +++++++
> 1 file changed, 7 insertions(+)
>
> diff --git a/fs/iomap.c b/fs/iomap.c
> index 90c2febc93ac..7c369faea1dc 100644
> --- a/fs/iomap.c
> +++ b/fs/iomap.c
> @@ -117,6 +117,12 @@ iomap_page_create(struct inode *inode, struct page *page)
> atomic_set(&iop->read_count, 0);
> atomic_set(&iop->write_count, 0);
> bitmap_zero(iop->uptodate, PAGE_SIZE / SECTOR_SIZE);
> +
> + /*
> + * 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;
> @@ -133,6 +139,7 @@ iomap_page_release(struct page *page)
> WARN_ON_ONCE(atomic_read(&iop->write_count));
> ClearPagePrivate(page);
> set_page_private(page, 0);
> + put_page(page);
> kfree(iop);
> }
>
> --
> 2.11.0.262.g4b0a5b2.dirty
>
next prev parent reply other threads:[~2018-11-15 21:07 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-11-15 18:41 p.jaroszynski
2018-11-15 21:07 ` William Kucharski [this message]
2018-12-03 23:22 ` Andrew Morton
2018-12-04 0:38 ` Piotr Jaroszynski
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=96C997D3-DE5F-4553-9D35-C517EC4AF510@oracle.com \
--to=william.kucharski@oracle.com \
--cc=hch@lst.de \
--cc=linux-fsdevel@vger.kernel.org \
--cc=linux-mm@kvack.org \
--cc=p.jaroszynski@gmail.com \
--cc=pjaroszynski@nvidia.com \
--cc=viro@zeniv.linux.org.uk \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox