diff options
Diffstat (limited to 'fs/ocfs2/journal.h')
-rw-r--r-- | fs/ocfs2/journal.h | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/fs/ocfs2/journal.h b/fs/ocfs2/journal.h index 4939c04290ca..5585dde91344 100644 --- a/fs/ocfs2/journal.h +++ b/fs/ocfs2/journal.h | |||
@@ -458,6 +458,16 @@ static inline int ocfs2_rename_credits(struct super_block *sb) | |||
458 | #define OCFS2_DX_ROOT_REMOVE_CREDITS (OCFS2_INODE_UPDATE_CREDITS + \ | 458 | #define OCFS2_DX_ROOT_REMOVE_CREDITS (OCFS2_INODE_UPDATE_CREDITS + \ |
459 | OCFS2_SUBALLOC_FREE) | 459 | OCFS2_SUBALLOC_FREE) |
460 | 460 | ||
461 | static inline int ocfs2_calc_dxi_expand_credits(struct super_block *sb) | ||
462 | { | ||
463 | int credits = 1 + OCFS2_SUBALLOC_ALLOC; | ||
464 | |||
465 | credits += ocfs2_clusters_to_blocks(sb, 1); | ||
466 | credits += ocfs2_quota_trans_credits(sb); | ||
467 | |||
468 | return credits; | ||
469 | } | ||
470 | |||
461 | /* | 471 | /* |
462 | * Please note that the caller must make sure that root_el is the root | 472 | * Please note that the caller must make sure that root_el is the root |
463 | * of extent tree. So for an inode, it should be &fe->id2.i_list. Otherwise | 473 | * of extent tree. So for an inode, it should be &fe->id2.i_list. Otherwise |