]> bbs.cooldavid.org Git - net-next-2.6.git/commitdiff
ext4: Calculate required journal credits for inserting an extent properly
authorAneesh Kumar K.V <aneesh.kumar@linux.vnet.ibm.com>
Mon, 6 Jul 2009 03:12:04 +0000 (23:12 -0400)
committerTheodore Ts'o <tytso@mit.edu>
Mon, 6 Jul 2009 03:12:04 +0000 (23:12 -0400)
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 <adilger@sun.com>
Signed-off-by: Aneesh Kumar K.V <aneesh.kumar@linux.vnet.ibm.com>
Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
fs/ext4/extents.c

index 50322a09bd01af54d66cf2d344765b8b92075332..73ebfb44ad750f0405976f7ff6c792936edb0765 100644 (file)
@@ -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;
                }
        }