提交 832d09cf 编写于 作者: J Jan Kara

ocfs2: Fix estimate of credits needed for quota allocation

We were missing reservation of a journal credit for modification of quota
file inode when creating new dquot structure in the global quota file.
Acked-by: NJoel Becker <Joel.Becker@oracle.com>
Signed-off-by: NJan Kara <jack@suse.cz>
上级 fb8dd8d7
...@@ -468,9 +468,10 @@ static int ocfs2_global_qinit_alloc(struct super_block *sb, int type) ...@@ -468,9 +468,10 @@ static int ocfs2_global_qinit_alloc(struct super_block *sb, int type)
static int ocfs2_calc_global_qinit_credits(struct super_block *sb, int type) static int ocfs2_calc_global_qinit_credits(struct super_block *sb, int type)
{ {
/* We modify all the allocated blocks, tree root, and info block */ /* We modify all the allocated blocks, tree root, info block and
* the inode */
return (ocfs2_global_qinit_alloc(sb, type) + 2) * return (ocfs2_global_qinit_alloc(sb, type) + 2) *
OCFS2_QUOTA_BLOCK_UPDATE_CREDITS; OCFS2_QUOTA_BLOCK_UPDATE_CREDITS + 1;
} }
/* Sync local information about quota modifications with global quota file. /* Sync local information about quota modifications with global quota file.
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册