X-Git-Url: http://git.monstr.eu/?a=blobdiff_plain;f=mm%2Fgup.c;h=886d6148d3d03afbce35cdc7352c928d00c003bc;hb=2d338201d5311bcd79d42f66df4cecbcbc5f4f2c;hp=9935a448071045b7dd5e5d9107272d667fff5ef5;hpb=d6742212c0c6ccee2351499db80acba71fa36052;p=linux-2.6-microblaze.git diff --git a/mm/gup.c b/mm/gup.c index 9935a4480710..886d6148d3d0 100644 --- a/mm/gup.c +++ b/mm/gup.c @@ -62,24 +62,11 @@ static void put_page_refs(struct page *page, int refs) put_page(page); } -/** - * try_get_compound_head() - return the compound head page with refcount - * appropriately incremented, or NULL if that failed. - * - * This handles potential refcount overflow correctly. It also works correctly - * for various lockless get_user_pages()-related callers, due to the use of - * page_cache_add_speculative(). - * - * Even though the name includes "compound_head", this function is still - * appropriate for callers that have a non-compound @page to get. - * - * @page: pointer to page to be gotten - * @refs: the value to add to the page's refcount - * - * Return: head page (with refcount appropriately incremented) for success, or - * NULL upon failure. +/* + * Return the compound head page with ref appropriately incremented, + * or NULL if that failed. */ -struct page *try_get_compound_head(struct page *page, int refs) +static inline struct page *try_get_compound_head(struct page *page, int refs) { struct page *head = compound_head(page);