diff options
Diffstat (limited to 'fs/ocfs2/quota_global.c')
-rw-r--r-- | fs/ocfs2/quota_global.c | 18 |
1 files changed, 13 insertions, 5 deletions
diff --git a/fs/ocfs2/quota_global.c b/fs/ocfs2/quota_global.c index dab45467b5fd..cc8785cf8f61 100644 --- a/fs/ocfs2/quota_global.c +++ b/fs/ocfs2/quota_global.c | |||
@@ -648,10 +648,15 @@ int ocfs2_calc_qdel_credits(struct super_block *sb, int type) | |||
648 | return 0; | 648 | return 0; |
649 | 649 | ||
650 | oinfo = sb_dqinfo(sb, type)->dqi_priv; | 650 | oinfo = sb_dqinfo(sb, type)->dqi_priv; |
651 | /* We modify tree, leaf block, global info, local chunk header, | 651 | /* |
652 | * global and local inode */ | 652 | * We modify tree, leaf block, global info, local chunk header, |
653 | return oinfo->dqi_gi.dqi_qtree_depth + 2 + 1 + | 653 | * global and local inode; OCFS2_QINFO_WRITE_CREDITS already |
654 | 2 * OCFS2_INODE_UPDATE_CREDITS; | 654 | * accounts for inode update |
655 | */ | ||
656 | return oinfo->dqi_gi.dqi_qtree_depth + | ||
657 | OCFS2_QINFO_WRITE_CREDITS + | ||
658 | 2 * OCFS2_QUOTA_BLOCK_UPDATE_CREDITS + | ||
659 | OCFS2_INODE_UPDATE_CREDITS; | ||
655 | } | 660 | } |
656 | 661 | ||
657 | static int ocfs2_release_dquot(struct dquot *dquot) | 662 | static int ocfs2_release_dquot(struct dquot *dquot) |
@@ -701,7 +706,10 @@ int ocfs2_calc_qinit_credits(struct super_block *sb, int type) | |||
701 | * global file we can modify info, tree and leaf block */ | 706 | * global file we can modify info, tree and leaf block */ |
702 | return ocfs2_calc_extend_credits(sb, &lfe->id2.i_list, 0) + | 707 | return ocfs2_calc_extend_credits(sb, &lfe->id2.i_list, 0) + |
703 | ocfs2_calc_extend_credits(sb, &gfe->id2.i_list, 0) + | 708 | ocfs2_calc_extend_credits(sb, &gfe->id2.i_list, 0) + |
704 | 3 + oinfo->dqi_gi.dqi_qtree_depth + 2; | 709 | OCFS2_LOCAL_QINFO_WRITE_CREDITS + |
710 | 2 * OCFS2_QUOTA_BLOCK_UPDATE_CREDITS + | ||
711 | oinfo->dqi_gi.dqi_qtree_depth + | ||
712 | 2 * OCFS2_QUOTA_BLOCK_UPDATE_CREDITS; | ||
705 | } | 713 | } |
706 | 714 | ||
707 | static int ocfs2_acquire_dquot(struct dquot *dquot) | 715 | static int ocfs2_acquire_dquot(struct dquot *dquot) |