From 523334ba508a8baaf5fc9f15fbad9ed04f334f48 Mon Sep 17 00:00:00 2001 From: Yongqiang Yang Date: Thu, 24 Mar 2011 08:48:39 +0800 Subject: ext3: Fix writepage credits computation for ordered mode Original computation forgets to count writes of indirect block themselves (it only counts with blocks necessary for their allocation) in ordered mode. Acked-by: Amir Goldstein Signed-off-by:Yongqiang Yang Signed-off-by: Jan Kara --- fs/ext3/inode.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'fs/ext3') diff --git a/fs/ext3/inode.c b/fs/ext3/inode.c index ae94f6d..7f5db46 100644 --- a/fs/ext3/inode.c +++ b/fs/ext3/inode.c @@ -3294,7 +3294,7 @@ static int ext3_writepage_trans_blocks(struct inode *inode) if (ext3_should_journal_data(inode)) ret = 3 * (bpp + indirects) + 2; else - ret = 2 * (bpp + indirects) + 2; + ret = 2 * (bpp + indirects) + indirects + 2; #ifdef CONFIG_QUOTA /* We know that structure was already allocated during dquot_initialize so -- cgit v1.1