/*
* there are following "locks":
* journal_start
- * i_alloc_sem
* i_mutex
* page lock
else
credits = osd_dto_credits_noquota[DTO_WRITE_BLOCK];
- OSD_DECLARE_OP(oh, write);
- oh->ot_credits += credits;
+ OSD_DECLARE_OP(oh, write, credits);
inode = osd_dt_obj(dt)->oo_inode;
LASSERT(th);
oh = container_of(th, struct osd_thandle, ot_super);
- OSD_DECLARE_OP(oh, punch);
-
/*
* we don't need to reserve credits for whole truncate
* it's not possible as truncate may need to free too many
* orphan list. if needed truncate will extend or restart
* transaction
*/
- oh->ot_credits += osd_dto_credits_noquota[DTO_ATTR_SET_BASE];
- oh->ot_credits += 3;
+ OSD_DECLARE_OP(oh, punch,
+ osd_dto_credits_noquota[DTO_ATTR_SET_BASE] + 3);
inode = osd_dt_obj(dt)->oo_inode;
LASSERT(inode);