public inbox for linux-mm@kvack.org
 help / color / mirror / Atom feed
From: "zhangpeng (AS)" <zhangpeng362@huawei.com>
To: Matthew Wilcox <willy@infradead.org>
Cc: <linux-mm@kvack.org>, <akpm@linux-foundation.org>,
	<wangkefeng.wang@huawei.com>, <sunnanyong@huawei.com>
Subject: Re: [PATCH] mm/secretmem: use a folio in secretmem_fault()
Date: Sat, 12 Aug 2023 14:24:59 +0800	[thread overview]
Message-ID: <3d48e5b6-8358-708b-e490-4d41d0dd2059@huawei.com> (raw)
In-Reply-To: <ZNcCUsK1z/iPSa8f@casper.infradead.org>

On 2023/8/12 11:53, Matthew Wilcox wrote:

> On Sat, Aug 12, 2023 at 09:58:35AM +0800, Peng Zhang wrote:
>> From: ZhangPeng <zhangpeng362@huawei.com>
>>
>> Saves three implicit call to compound_head().
> I count four!
>
>>   		if (err) {
>> -			put_page(page);
>> +			folio_put(folio);
>>   			ret = vmf_error(err);
> One.
>
>>   
>> -		__SetPageUptodate(page);
>> -		err = add_to_page_cache_lru(page, mapping, offset, gfp);
>> +		__folio_mark_uptodate(folio);
>> +		err = filemap_add_folio(mapping, folio, offset, gfp);
> Two, three.
>
>>   		if (unlikely(err)) {
>> -			put_page(page);
>> +			folio_put(folio);
> Four!
>
> Reviewed-by: Matthew Wilcox (Oracle) <willy@infradead.org>

Indeed. Thanks!

-- 
Best Regards,
Peng



      reply	other threads:[~2023-08-12  6:25 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-08-12  1:58 [PATCH] mm/secretmem: use a folio in secretmem_fault() Peng Zhang
2023-08-12  3:53 ` Matthew Wilcox
2023-08-12  6:24   ` zhangpeng (AS) [this message]

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=3d48e5b6-8358-708b-e490-4d41d0dd2059@huawei.com \
    --to=zhangpeng362@huawei.com \
    --cc=akpm@linux-foundation.org \
    --cc=linux-mm@kvack.org \
    --cc=sunnanyong@huawei.com \
    --cc=wangkefeng.wang@huawei.com \
    --cc=willy@infradead.org \
    /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