mirror of
https://git.proxmox.com/git/mirror_zfs.git
synced 2026-05-28 17:39:23 +03:00
Cleanup DB_DNODE() macros usage
- Use the macros in few places it was missed. - Reduce scope of DB_DNODE_ENTER/EXIT() and inline some DB_DNODE() uses to make it more obvious what exactly is protected there and make unprotected accesses by mistake more difficult. - Make use of zrl_owner(). Reviewed-by: Rob Wing <rob.wing@klarasystems.com Reviewed-by: Tony Hutter <hutter2@llnl.gov> Reviewed-by: Allan Jude <allan@klarasystems.com> Reviewed-by: Brian Behlendorf <behlendorf1@llnl.gov> Signed-off-by: Alexander Motin <mav@FreeBSD.org> Sponsored by: iXsystems, Inc. Closes #16374
This commit is contained in:
committed by
Tony Hutter
parent
baa5031456
commit
56608daa8d
+1
-3
@@ -1851,7 +1851,6 @@ sa_modify_attrs(sa_handle_t *hdl, sa_attr_type_t newattr,
|
||||
{
|
||||
sa_os_t *sa = hdl->sa_os->os_sa;
|
||||
dmu_buf_impl_t *db = (dmu_buf_impl_t *)hdl->sa_bonus;
|
||||
dnode_t *dn;
|
||||
sa_bulk_attr_t *attr_desc;
|
||||
void *old_data[2];
|
||||
int bonus_attr_count = 0;
|
||||
@@ -1871,8 +1870,7 @@ sa_modify_attrs(sa_handle_t *hdl, sa_attr_type_t newattr,
|
||||
/* First make of copy of the old data */
|
||||
|
||||
DB_DNODE_ENTER(db);
|
||||
dn = DB_DNODE(db);
|
||||
if (dn->dn_bonuslen != 0) {
|
||||
if (DB_DNODE(db)->dn_bonuslen != 0) {
|
||||
bonus_data_size = hdl->sa_bonus->db_size;
|
||||
old_data[0] = kmem_alloc(bonus_data_size, KM_SLEEP);
|
||||
memcpy(old_data[0], hdl->sa_bonus->db_data,
|
||||
|
||||
Reference in New Issue
Block a user