Fix ztest_verify_dnode_bt() test case
In ztest_verify_dnode_bt the ztest_object_lock must be held in order to safely verify the unused bonus space. Reviewed-by: DHE <git@dehacked.net> Signed-off-by: Brian Behlendorf <behlendorf1@llnl.gov> Closes #6941
This commit is contained in:
parent
460f239e69
commit
06401e4222
|
@ -5172,8 +5172,11 @@ ztest_verify_dnode_bt(ztest_ds_t *zd, uint64_t id)
|
|||
dmu_object_info_t doi;
|
||||
dmu_buf_t *db;
|
||||
|
||||
if (dmu_bonus_hold(os, obj, FTAG, &db) != 0)
|
||||
ztest_object_lock(zd, obj, RL_READER);
|
||||
if (dmu_bonus_hold(os, obj, FTAG, &db) != 0) {
|
||||
ztest_object_unlock(zd, obj);
|
||||
continue;
|
||||
}
|
||||
|
||||
dmu_object_info_from_db(db, &doi);
|
||||
if (doi.doi_bonus_size >= sizeof (*bt))
|
||||
|
@ -5187,6 +5190,7 @@ ztest_verify_dnode_bt(ztest_ds_t *zd, uint64_t id)
|
|||
}
|
||||
|
||||
dmu_buf_rele(db, FTAG);
|
||||
ztest_object_unlock(zd, obj);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue