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@xxxxxxxxx. For more info on Linux MM,
see: http://www.linux-mm.org/ .
Don't email: <a href=mailto:"dont@xxxxxxxxx"> email@xxxxxxxxx </a>