Lines Matching full:imu
141 struct io_mapped_ubuf *imu = *slot; in io_buffer_unmap() local
144 if (imu != ctx->dummy_ubuf) { in io_buffer_unmap()
145 for (i = 0; i < imu->nr_bvecs; i++) in io_buffer_unmap()
146 unpin_user_page(imu->bvec[i].bv_page); in io_buffer_unmap()
147 if (imu->acct_pages) in io_buffer_unmap()
148 io_unaccount_mem(ctx, imu->acct_pages); in io_buffer_unmap()
149 kvfree(imu); in io_buffer_unmap()
530 struct io_mapped_ubuf *imu; in __io_sqe_buffers_update() local
548 err = io_sqe_buffer_register(ctx, &iov, &imu, &last_hpage); in __io_sqe_buffers_update()
557 io_buffer_unmap(ctx, &imu); in __io_sqe_buffers_update()
564 ctx->user_bufs[i] = imu; in __io_sqe_buffers_update()
1080 struct io_mapped_ubuf *imu = ctx->user_bufs[i]; in headpage_already_acct() local
1082 for (j = 0; j < imu->nr_bvecs; j++) { in headpage_already_acct()
1083 if (!PageCompound(imu->bvec[j].bv_page)) in headpage_already_acct()
1085 if (compound_head(imu->bvec[j].bv_page) == hpage) in headpage_already_acct()
1094 int nr_pages, struct io_mapped_ubuf *imu, in io_buffer_account_pin() argument
1099 imu->acct_pages = 0; in io_buffer_account_pin()
1102 imu->acct_pages++; in io_buffer_account_pin()
1112 imu->acct_pages += page_size(hpage) >> PAGE_SHIFT; in io_buffer_account_pin()
1116 if (!imu->acct_pages) in io_buffer_account_pin()
1119 ret = io_account_mem(ctx, imu->acct_pages); in io_buffer_account_pin()
1121 imu->acct_pages = 0; in io_buffer_account_pin()
1190 struct io_mapped_ubuf *imu = NULL; in io_sqe_buffer_register() local
1209 imu = kvmalloc(struct_size(imu, bvec, nr_pages), GFP_KERNEL); in io_sqe_buffer_register()
1210 if (!imu) in io_sqe_buffer_register()
1213 ret = io_buffer_account_pin(ctx, pages, nr_pages, imu, last_hpage); in io_sqe_buffer_register()
1225 imu->bvec[i].bv_page = pages[i]; in io_sqe_buffer_register()
1226 imu->bvec[i].bv_len = vec_len; in io_sqe_buffer_register()
1227 imu->bvec[i].bv_offset = off; in io_sqe_buffer_register()
1232 imu->ubuf = (unsigned long) iov->iov_base; in io_sqe_buffer_register()
1233 imu->ubuf_end = imu->ubuf + iov->iov_len; in io_sqe_buffer_register()
1234 imu->nr_bvecs = nr_pages; in io_sqe_buffer_register()
1235 *pimu = imu; in io_sqe_buffer_register()
1239 kvfree(imu); in io_sqe_buffer_register()
1310 struct io_mapped_ubuf *imu, in io_import_fixed() argument
1316 if (WARN_ON_ONCE(!imu)) in io_import_fixed()
1321 if (unlikely(buf_addr < imu->ubuf || buf_end > imu->ubuf_end)) in io_import_fixed()
1328 offset = buf_addr - imu->ubuf; in io_import_fixed()
1329 iov_iter_bvec(iter, ddir, imu->bvec, imu->nr_bvecs, offset + len); in io_import_fixed()
1348 const struct bio_vec *bvec = imu->bvec; in io_import_fixed()