Skip to content

Commit

Permalink
ext3: Fix writepage credits computation for ordered mode
Browse files Browse the repository at this point in the history
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 <amir73il@users.sf.net>
Signed-off-by:Yongqiang Yang <xiaoqiangnk@gmail.com>
Signed-off-by: Jan Kara <jack@suse.cz>
  • Loading branch information
Yongqiang Yang authored and Jan Kara committed Mar 24, 2011
1 parent eddecbb commit 523334b
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion fs/ext3/inode.c
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 523334b

Please sign in to comment.