Changeset 96227 in vbox
- Timestamp:
- Aug 16, 2022 3:38:28 PM (2 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Additions/linux/sharedfolders/regops.c
r95210 r96227 2096 2096 #endif /* < 5.10.0 */ 2097 2097 #if RTLNX_VER_MIN(2,6,19) 2098 /* See kernel 6.0.0 change eba2d3d798295dc43cae8fade102f9d083a2a741. */ 2099 # if RTLNX_VER_MIN(6,0,0) 2100 # define VBOX_IOV_GET_PAGES iov_iter_get_pages2 2101 # else 2102 # define VBOX_IOV_GET_PAGES iov_iter_get_pages 2103 # endif 2098 2104 2099 2105 /** … … 2186 2192 iov_iter_advance(iter, 0); 2187 2193 # endif 2188 cbSegRet = iov_iter_get_pages(iter, papPages, iov_iter_count(iter), cMaxPages, &offPage0);2194 cbSegRet = VBOX_IOV_GET_PAGES(iter, papPages, iov_iter_count(iter), cMaxPages, &offPage0); 2189 2195 if (cbSegRet > 0) { 2196 # if RTLNX_VER_MAX(6,0,0) 2190 2197 iov_iter_advance(iter, cbSegRet); 2198 #endif 2191 2199 cbChunk = (size_t)cbSegRet; 2192 2200 cPages = RT_ALIGN_Z(offPage0 + cbSegRet, PAGE_SIZE) >> PAGE_SHIFT; … … 2212 2220 cbSeg = iov_iter_single_seg_count(iter); 2213 2221 } 2214 cbSegRet = iov_iter_get_pages(iter, &papPages[cPages], iov_iter_count(iter), 1, &offPgProbe);2222 cbSegRet = VBOX_IOV_GET_PAGES(iter, &papPages[cPages], iov_iter_count(iter), 1, &offPgProbe); 2215 2223 if (cbSegRet > 0) { 2224 # if RTLNX_VER_MAX(6,0,0) 2216 2225 iov_iter_advance(iter, cbSegRet); /** @todo maybe not do this if we stash the page? */ 2226 #endif 2217 2227 Assert(offPgProbe + cbSegRet <= PAGE_SIZE); 2218 2228 if (offPgProbe == 0) { … … 2230 2240 cbSeg -= cbSegRet; 2231 2241 if (cbSeg > 0) { 2232 cbSegRet = iov_iter_get_pages(iter, &papPages[cPages], iov_iter_count(iter), cMaxPages, &offPgProbe);2242 cbSegRet = VBOX_IOV_GET_PAGES(iter, &papPages[cPages], iov_iter_count(iter), cMaxPages, &offPgProbe); 2233 2243 if (cbSegRet > 0) { 2234 2244 size_t const cPgRet = RT_ALIGN_Z((size_t)cbSegRet, PAGE_SIZE) >> PAGE_SHIFT; 2235 2245 Assert(offPgProbe == 0); 2246 # if RTLNX_VER_MAX(6,0,0) 2236 2247 iov_iter_advance(iter, cbSegRet); 2248 # endif 2237 2249 SFLOG3(("vbsf_iter_lock_pages: iov_iter_get_pages() -> %#zx; %#zx pages\n", cbSegRet, cPgRet)); 2238 2250 cPages += cPgRet;
Note:
See TracChangeset
for help on using the changeset viewer.