summaryrefslogtreecommitdiffstats
path: root/fs/ext4/ext4_common.c
diff options
context:
space:
mode:
Diffstat (limited to 'fs/ext4/ext4_common.c')
-rw-r--r--fs/ext4/ext4_common.c6
1 files changed, 2 insertions, 4 deletions
diff --git a/fs/ext4/ext4_common.c b/fs/ext4/ext4_common.c
index 02da75c084..62e2e80492 100644
--- a/fs/ext4/ext4_common.c
+++ b/fs/ext4/ext4_common.c
@@ -904,10 +904,8 @@ long int ext4fs_get_new_blk_no(void)
restart:
fs->curr_blkno++;
/* get the blockbitmap index respective to blockno */
- if (fs->blksz != 1024) {
- bg_idx = fs->curr_blkno / blk_per_grp;
- } else {
- bg_idx = fs->curr_blkno / blk_per_grp;
+ bg_idx = fs->curr_blkno / blk_per_grp;
+ if (fs->blksz == 1024) {
remainder = fs->curr_blkno % blk_per_grp;
if (!remainder)
bg_idx--;
OpenPOWER on IntegriCloud