summaryrefslogtreecommitdiff
path: root/include/linux/page_ref.h
diff options
context:
space:
mode:
Diffstat (limited to 'include/linux/page_ref.h')
-rw-r--r--include/linux/page_ref.h2
1 files changed, 1 insertions, 1 deletions
diff --git a/include/linux/page_ref.h b/include/linux/page_ref.h
index 8c236c651d1d..544150d1d5fd 100644
--- a/include/linux/page_ref.h
+++ b/include/linux/page_ref.h
@@ -234,7 +234,7 @@ static inline bool page_ref_add_unless(struct page *page, int nr, int u)
rcu_read_lock();
/* avoid writing to the vmemmap area being remapped */
- if (!page_is_fake_head(page) && page_ref_count(page) != u)
+ if (page_count_writable(page, u))
ret = atomic_add_unless(&page->_refcount, nr, u);
rcu_read_unlock();