Print this page
patch first-pass

Split Close
Expand all
Collapse all
          --- old/usr/src/uts/common/fs/zfs/sa.c
          +++ new/usr/src/uts/common/fs/zfs/sa.c
↓ open down ↓ 1372 lines elided ↑ open up ↑
1373 1373          /* find handle, if it exists */
1374 1374          /* if one doesn't exist then create a new one, and initialize it */
1375 1375  
1376 1376          if (hdl_type == SA_HDL_SHARED)
1377 1377                  handle = dmu_buf_get_user(db);
1378 1378  
1379 1379          if (handle == NULL) {
1380 1380                  sa_handle_t *winner = NULL;
1381 1381  
1382 1382                  handle = kmem_cache_alloc(sa_cache, KM_SLEEP);
     1383 +                handle->sa_dbu.dbu_evict_func_prep = NULL;
1383 1384                  handle->sa_dbu.dbu_evict_func = NULL;
1384 1385                  handle->sa_userp = userp;
1385 1386                  handle->sa_bonus = db;
1386 1387                  handle->sa_os = os;
1387 1388                  handle->sa_spill = NULL;
1388 1389                  handle->sa_bonus_tab = NULL;
1389 1390                  handle->sa_spill_tab = NULL;
1390 1391  
1391 1392                  error = sa_build_index(handle, SA_BONUS);
1392 1393  
1393 1394                  if (hdl_type == SA_HDL_SHARED) {
1394      -                        dmu_buf_init_user(&handle->sa_dbu, sa_evict, NULL);
     1395 +                        dmu_buf_init_user(&handle->sa_dbu, NULL, sa_evict,
     1396 +                            NULL);
1395 1397                          winner = dmu_buf_set_user_ie(db, &handle->sa_dbu);
1396 1398                  }
1397 1399  
1398 1400                  if (winner != NULL) {
1399 1401                          kmem_cache_free(sa_cache, handle);
1400 1402                          handle = winner;
1401 1403                  }
1402 1404          }
1403 1405          *handlepp = handle;
1404 1406  
↓ open down ↓ 606 lines elided ↑ open up ↑
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX