Fix TXG_MASK cstyle
Fix style issue for 'tx->tx_txg&TXG_MASK'. There should be white space around the '&' character. Split the dnode_reallocate() ASSERT to make it more readable to clearly separate the checks. Reviewed-by: George Melikov <mail@gmelikov.ru> Reviewed-by: Tom Caputi <tcaputi@datto.com> Signed-off-by: Brian Behlendorf <behlendorf1@llnl.gov> Closes #8606
This commit is contained in:
parent
9e3485abfc
commit
3fa93bb8d3
|
@ -1280,7 +1280,6 @@ receive_object(struct receive_writer_arg *rwa, struct drr_object *drro,
|
|||
return (err);
|
||||
|
||||
err = dmu_free_long_object(rwa->os, slot);
|
||||
|
||||
if (err != 0)
|
||||
return (err);
|
||||
|
||||
|
@ -1316,6 +1315,7 @@ receive_object(struct receive_writer_arg *rwa, struct drr_object *drro,
|
|||
drro->drr_bonustype, drro->drr_bonuslen,
|
||||
dn_slots << DNODE_SHIFT, tx);
|
||||
}
|
||||
|
||||
if (err != 0) {
|
||||
dmu_tx_commit(tx);
|
||||
return (SET_ERROR(EINVAL));
|
||||
|
|
|
@ -690,9 +690,10 @@ dnode_reallocate(dnode_t *dn, dmu_object_type_t ot, int blocksize,
|
|||
dnode_setdirty(dn, tx);
|
||||
if (dn->dn_datablksz != blocksize) {
|
||||
/* change blocksize */
|
||||
ASSERT(dn->dn_maxblkid == 0 &&
|
||||
(BP_IS_HOLE(&dn->dn_phys->dn_blkptr[0]) ||
|
||||
dnode_block_freed(dn, 0)));
|
||||
ASSERT0(dn->dn_maxblkid);
|
||||
ASSERT(BP_IS_HOLE(&dn->dn_phys->dn_blkptr[0]) ||
|
||||
dnode_block_freed(dn, 0));
|
||||
|
||||
dnode_setdblksz(dn, blocksize);
|
||||
dn->dn_next_blksz[tx->tx_txg & TXG_MASK] = blocksize;
|
||||
}
|
||||
|
@ -713,6 +714,7 @@ dnode_reallocate(dnode_t *dn, dmu_object_type_t ot, int blocksize,
|
|||
dbuf_rm_spill(dn, tx);
|
||||
dnode_rm_spill(dn, tx);
|
||||
}
|
||||
|
||||
rw_exit(&dn->dn_struct_rwlock);
|
||||
|
||||
/* change type */
|
||||
|
|
Loading…
Reference in New Issue