wake_up_all(&q->waiters);
}
+static inline void unpin_page(struct page *page)
+{
+ /* Avoid releasing the page which is on the LRU list. I don't
+ know if this is correct, but it stops the BUG() in
+ __free_pages_ok(). */
+ page_cache_release(page);
+}
+
static int futex_wake(struct list_head *head,
struct page *page,
unsigned int offset,
int err;
down_read(&mm->mmap_sem);
- err = get_user_pages(current, current->mm, page_start,
+ err = get_user_pages(current, mm, page_start,
1 /* one page */,
- 1 /* writable */,
+ 0 /* writable not important */,
0 /* don't force */,
&page,
NULL /* don't return vmas */);
default:
ret = -EINVAL;
}
- page_cache_release(page);
+ unpin_page(page);
return ret;
}