Lines Matching refs:nr_pages
157 static int rds_pin_pages(unsigned long user_addr, unsigned int nr_pages, in rds_pin_pages() argument
162 ret = get_user_pages_fast(user_addr, nr_pages, write, pages); in rds_pin_pages()
164 if (ret >= 0 && ret < nr_pages) { in rds_pin_pages()
177 unsigned int nr_pages; in __rds_rdma_map() local
197 nr_pages = rds_pages_in_vec(&args->vec); in __rds_rdma_map()
198 if (nr_pages == 0) { in __rds_rdma_map()
204 args->vec.addr, args->vec.bytes, nr_pages); in __rds_rdma_map()
207 pages = kcalloc(nr_pages, sizeof(struct page *), GFP_KERNEL); in __rds_rdma_map()
241 ret = rds_pin_pages(args->vec.addr, nr_pages, pages, 1); in __rds_rdma_map()
487 unsigned int nr_pages; in rds_rdma_pages() local
492 nr_pages = rds_pages_in_vec(&iov[i]); in rds_rdma_pages()
493 if (nr_pages == 0) in rds_rdma_pages()
496 tot_pages += nr_pages; in rds_rdma_pages()
514 unsigned int nr_pages; in rds_rdma_extra_size() local
528 nr_pages = rds_pages_in_vec(&vec); in rds_rdma_extra_size()
529 if (nr_pages == 0) in rds_rdma_extra_size()
532 tot_pages += nr_pages; in rds_rdma_extra_size()
554 int nr_pages; in rds_cmsg_rdma_args() local
593 nr_pages = rds_rdma_pages(iovs, args->nr_local); in rds_cmsg_rdma_args()
594 if (nr_pages < 0) { in rds_cmsg_rdma_args()
599 pages = kcalloc(nr_pages, sizeof(struct page *), GFP_KERNEL); in rds_cmsg_rdma_args()
611 WARN_ON(!nr_pages); in rds_cmsg_rdma_args()
612 op->op_sg = rds_message_alloc_sgs(rm, nr_pages); in rds_cmsg_rdma_args()