From: Mike Kravetz <mike.kravetz@oracle.com>
To: Hillf Danton <hillf.zj@alibaba-inc.com>,
Dave Hansen <dave.hansen@linux.intel.com>
Cc: linux-kernel <linux-kernel@vger.kernel.org>, linux-mm@kvack.org
Subject: Re: [RFC PATCH 3/4] hugetlbfs: add hugetlbfs_fallocate()
Date: Fri, 17 Apr 2015 10:14:18 -0700 [thread overview]
Message-ID: <55313F6A.4010506@oracle.com> (raw)
In-Reply-To: <010201d078e4$97cf82a0$c76e87e0$@alibaba-inc.com>
On 04/17/2015 01:00 AM, Hillf Danton wrote:
>> + clear_huge_page(page, addr, pages_per_huge_page(h));
>> + __SetPageUptodate(page);
>> + error = huge_add_to_page_cache(page, mapping, index);
>> + if (error) {
>> + put_page(page);
>> + /* Keep going if we see an -EEXIST */
>> + if (error != -EEXIST)
>> + goto out; /* FIXME, need to free? */
>> + }
>> +
>> + /*
>> + * page_put due to reference from alloc_huge_page()
>> + * unlock_page because locked by add_to_page_cache()
>> + */
>> + put_page(page);
>
> Still needed if EEXIST?
Nope. Good catch.
I'll fix this in the next version.
--
Mike Kravetz
--
To unsubscribe, send a message with 'unsubscribe linux-mm' in
the body to majordomo@kvack.org. For more info on Linux MM,
see: http://www.linux-mm.org/ .
Don't email: <a href=mailto:"dont@kvack.org"> email@kvack.org </a>
WARNING: multiple messages have this Message-ID (diff)
From: Mike Kravetz <mike.kravetz@oracle.com>
To: Hillf Danton <hillf.zj@alibaba-inc.com>,
Dave Hansen <dave.hansen@linux.intel.com>
Cc: linux-kernel <linux-kernel@vger.kernel.org>, linux-mm@kvack.org
Subject: Re: [RFC PATCH 3/4] hugetlbfs: add hugetlbfs_fallocate()
Date: Fri, 17 Apr 2015 10:14:18 -0700 [thread overview]
Message-ID: <55313F6A.4010506@oracle.com> (raw)
In-Reply-To: <010201d078e4$97cf82a0$c76e87e0$@alibaba-inc.com>
On 04/17/2015 01:00 AM, Hillf Danton wrote:
>> + clear_huge_page(page, addr, pages_per_huge_page(h));
>> + __SetPageUptodate(page);
>> + error = huge_add_to_page_cache(page, mapping, index);
>> + if (error) {
>> + put_page(page);
>> + /* Keep going if we see an -EEXIST */
>> + if (error != -EEXIST)
>> + goto out; /* FIXME, need to free? */
>> + }
>> +
>> + /*
>> + * page_put due to reference from alloc_huge_page()
>> + * unlock_page because locked by add_to_page_cache()
>> + */
>> + put_page(page);
>
> Still needed if EEXIST?
Nope. Good catch.
I'll fix this in the next version.
--
Mike Kravetz
next prev parent reply other threads:[~2015-04-17 17:14 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <00fc01d078e3$63428ec0$29c7ac40$@alibaba-inc.com>
2015-04-17 8:00 ` [RFC PATCH 3/4] hugetlbfs: add hugetlbfs_fallocate() Hillf Danton
2015-04-17 8:00 ` Hillf Danton
2015-04-17 17:14 ` Mike Kravetz [this message]
2015-04-17 17:14 ` Mike Kravetz
2015-04-16 23:02 [RFC PATCH 0/4] hugetlbfs: add fallocate support Mike Kravetz
2015-04-16 23:02 ` [RFC PATCH 3/4] hugetlbfs: add hugetlbfs_fallocate() Mike Kravetz
2015-04-16 23:02 ` Mike Kravetz
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=55313F6A.4010506@oracle.com \
--to=mike.kravetz@oracle.com \
--cc=dave.hansen@linux.intel.com \
--cc=hillf.zj@alibaba-inc.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-mm@kvack.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.