···4545static4646DEFINE_PER_CPU_SHARED_ALIGNED(struct rds_page_remainder, rds_page_remainders);47474848-/*4949- * returns 0 on success or -errno on failure.5050- *5151- * We don't have to worry about flush_dcache_page() as this only works5252- * with private pages. If, say, we were to do directed receive to pinned5353- * user pages we'd have to worry more about cache coherence. (Though5454- * the flush_dcache_page() in get_user_pages() would probably be enough).5555- */5656-int rds_page_copy_user(struct page *page, unsigned long offset,5757- void __user *ptr, unsigned long bytes,5858- int to_user)5959-{6060- unsigned long ret;6161- void *addr;6262-6363- addr = kmap(page);6464- if (to_user) {6565- rds_stats_add(s_copy_to_user, bytes);6666- ret = copy_to_user(ptr, addr + offset, bytes);6767- } else {6868- rds_stats_add(s_copy_from_user, bytes);6969- ret = copy_from_user(addr + offset, ptr, bytes);7070- }7171- kunmap(page);7272-7373- return ret ? -EFAULT : 0;7474-}7575-EXPORT_SYMBOL_GPL(rds_page_copy_user);7676-7748/**7849 * rds_page_remainder_alloc - build up regions of a message.7950 *