-#if LUSTRE_VERSION_CODE < OBD_OCD_VERSION(2, 6, 50, 0)
- if (exp->exp_need_mne_swab)
- lustre_swab_mgs_nidtbl_entry(last_in_unit);
-#endif
- rc += bytes_in_unit;
- buf += bytes_in_unit;
- last_in_unit = NULL;
- }
- LASSERT((rc & (unit_size - 1)) == 0);
-
- if (units_in_page == 0) {
- /* allocate a new page */
- pages[index] = cfs_alloc_page(CFS_ALLOC_STD);
- if (pages[index] == NULL) {
- rc = -ENOMEM;
- break;
- }
-
- /* destroy previous map */
- if (index > 0)
- cfs_kunmap(pages[index - 1]);
-
- /* reassign buffer */
- buf = cfs_kmap(pages[index]);
- ++index;
-
- units_in_page = CFS_PAGE_SIZE / unit_size;
- LASSERT(units_in_page > 0);
- }
+ rc += bytes_in_unit;
+ buf += bytes_in_unit;
+ last_in_unit = NULL;
+ }
+ LASSERT((rc & (unit_size - 1)) == 0);
+
+ if (units_in_page == 0) {
+ /* allocate a new page */
+ pages[index] = alloc_page(GFP_KERNEL);
+ if (pages[index] == NULL) {
+ rc = -ENOMEM;
+ break;
+ }
+
+ /* destroy previous map */
+ if (index > 0)
+ kunmap(pages[index - 1]);
+
+ /* reassign buffer */
+ buf = kmap(pages[index]);
+ ++index;
+
+ units_in_page = PAGE_CACHE_SIZE / unit_size;
+ LASSERT(units_in_page > 0);
+ }