lkml.org 
[lkml]   [2015]   [Apr]   [17]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [RFC PATCH 3/4] hugetlbfs: add hugetlbfs_fallocate()
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


\
 
 \ /
  Last update: 2015-04-17 19:41    [W:0.047 / U:1.892 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site