ext4: Add a missing return in ext4_ext_calc_credits_for_single_extent
PATCH 1/1 ext4: Add a missing return in ext4_ext_calc_credits_for_single_extent
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 <[email protected]>
Signed-off-by Aneesh Kumar K.V <[email protected]>
--- fs/ext4/extents.c | 1 + 1 files changed, 1 insertions(+), 0 deletions(-)
fs/ext4/extents.c +1 -0
@@ -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; } }
Signature · 1 line
1.6.3.2.363.gc5764
Theodore Tso
maintainerQuoted 6 lines · Aneesh Kumar K.V
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 <[email protected]>Signed-off-by Aneesh Kumar K.V <[email protected]>
Thanks, added to the ext4 patch queue.
- Ted