From: Aneesh Kumar K.V Date: Mon, 6 Jul 2009 03:12:04 +0000 (-0400) Subject: ext4: Calculate required journal credits for inserting an extent properly X-Git-Url: http://git.cdn.openwrt.org/?a=commitdiff_plain;h=5887e98b609e96ce61ee0528cf94a2bfdc809dd7;p=openwrt%2Fstaging%2Fblogic.git ext4: Calculate required journal credits for inserting an extent properly When we have space in the extent tree leaf node we should be able to insert the extent with much less journal credits. The code was doing proper calculation but missed a return statement. Reported-by: Andreas Dilger Signed-off-by: Aneesh Kumar K.V Signed-off-by: "Theodore Ts'o" --- diff --git a/fs/ext4/extents.c b/fs/ext4/extents.c index 50322a09bd01..73ebfb44ad75 100644 --- a/fs/ext4/extents.c +++ b/fs/ext4/extents.c @@ -1977,6 +1977,7 @@ int ext4_ext_calc_credits_for_single_extent(struct inode *inode, int nrblocks, */ /* 1 bitmap, 1 block group descriptor */ ret = 2 + EXT4_META_TRANS_BLOCKS(inode->i_sb); + return ret; } }