summaryrefslogtreecommitdiffstats
path: root/fs
diff options
context:
space:
mode:
authorJan Kara <jack@suse.cz>2010-05-11 17:04:14 +0200
committerJan Kara <jack@suse.cz>2010-05-21 19:30:47 +0200
commit832d09cf1438bd172f69478bde74f20f05ec0115 (patch)
tree273eb6860b74f35b2fe43b8eaa808ea50af6955b /fs
parentfb8dd8d780140a3f0e9074831a59054fec6cc451 (diff)
downloadop-kernel-dev-832d09cf1438bd172f69478bde74f20f05ec0115.zip
op-kernel-dev-832d09cf1438bd172f69478bde74f20f05ec0115.tar.gz
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: Joel Becker <Joel.Becker@oracle.com> Signed-off-by: Jan Kara <jack@suse.cz>
Diffstat (limited to 'fs')
-rw-r--r--fs/ocfs2/quota_global.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/fs/ocfs2/quota_global.c b/fs/ocfs2/quota_global.c
index 1e3e0d5..7349958 100644
--- a/fs/ocfs2/quota_global.c
+++ b/fs/ocfs2/quota_global.c
@@ -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)
{
- /* 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) *
- OCFS2_QUOTA_BLOCK_UPDATE_CREDITS;
+ OCFS2_QUOTA_BLOCK_UPDATE_CREDITS + 1;
}
/* Sync local information about quota modifications with global quota file.
OpenPOWER on IntegriCloud