- /* vmpage have two known users: cl_page and VM page cache */
- if (page_count(vmpage) - page_mapcount(vmpage) > 2)
+ /* this check is racy because the vmpage is not locked, but
+ * that's OK - the code which does the actual page release
+ * checks this again before releasing
+ *
+ * vmpage have two known users: cl_page and VM page cache
+ */
+ if (vmpage_in_use(vmpage, 0))