- Timestamp:
- Apr 16, 2019 1:59:01 AM (6 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Additions/linux/sharedfolders/regops.c
r78135 r78139 299 299 300 300 #endif /* 2.6.19 <= linux < 3.16.0 */ 301 #if LINUX_VERSION_CODE >= KERNEL_VERSION(3, 16, 0) && LINUX_VERSION_CODE < KERNEL_VERSION(3, 17, 0) 302 303 /** This is for implementing cMaxPage on 3.16 which doesn't have it. */ 304 static ssize_t vbsf_iov_iter_get_pages_3_16(struct iov_iter *iter, struct page **papPages, 305 size_t cbMax, unsigned cMaxPages, size_t *poffPg0) 306 { 307 if (!(iter->type & ITER_BVEC)) { 308 size_t const offPg0 = iter->iov_offset & PAGE_OFFSET_MASK; 309 size_t const cbMaxPages = ((size_t)cMaxPages << PAGE_SHIFT) - offPg0; 310 if (cbMax > cbMaxPages) 311 cbMax = cbMaxPages; 312 } 313 /* else: BVEC works a page at a time and shouldn't have much of a problem here. */ 314 return iov_iter_get_pages(iter, papPages, cbMax, poffPg0); 315 } 316 # undef iov_iter_get_pages 317 # define iov_iter_get_pages(a_pIter, a_papPages, a_cbMax, a_cMaxPages, a_poffPg0) \ 318 vbsf_iov_iter_get_pages_3_16(a_pIter, a_papPages, a_cbMax, a_cMaxPages, a_poffPg0) 319 320 #endif /* 3.16.x */ 301 321 #if LINUX_VERSION_CODE >= KERNEL_VERSION(2, 6, 19) && LINUX_VERSION_CODE < KERNEL_VERSION(3, 18, 0) 302 322
Note:
See TracChangeset
for help on using the changeset viewer.