35 #include <linux/slab.h>
37 #include <linux/export.h>
79 spin_lock(&rds_info_lock);
80 BUG_ON(rds_info_funcs[offset]);
82 spin_unlock(&rds_info_lock);
92 spin_lock(&rds_info_lock);
93 BUG_ON(rds_info_funcs[offset] != func);
95 spin_unlock(&rds_info_lock);
126 rdsdebug(
"page %p addr %p offset %lu this %lu data %p "
128 iter->
offset,
this, data, bytes);
163 unsigned long nr_pages = 0;
178 start = (
unsigned long)optval;
179 if (len < 0 || len +
PAGE_SIZE - 1 < len || start + len < start) {
197 if (ret != nr_pages) {
206 rdsdebug(
"len %d nr_pages %lu\n", len, nr_pages);
219 func(sock, len, &iter, &lens);
222 total = lens.
nr * lens.
each;
238 for (i = 0; pages && i < nr_pages; i++)