summaryrefslogtreecommitdiff
path: root/fs/ext4/ext4_common.c
diff options
context:
space:
mode:
authorƁukasz Majewski <l.majewski@samsung.com>2014-05-06 09:36:04 +0200
committerTom Rini <trini@ti.com>2014-05-12 16:31:50 -0400
commit35dd055b94eb3ed8c21595eedd740431866b2f26 (patch)
tree10aa3517a501ce0ade07e83d76ce782cac154ced /fs/ext4/ext4_common.c
parentae95fad5af3793ae804b4390727e0f431e5514d7 (diff)
downloadu-boot-imx-35dd055b94eb3ed8c21595eedd740431866b2f26.zip
u-boot-imx-35dd055b94eb3ed8c21595eedd740431866b2f26.tar.gz
u-boot-imx-35dd055b94eb3ed8c21595eedd740431866b2f26.tar.bz2
fs:ext4:cleanup: Remove superfluous code
Code responsible for handling situation when ext4 has block size of 1024B can be ordered to take less space. This patch does that for ext4 common and write files. Signed-off-by: Lukasz Majewski <l.majewski@samsung.com>
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 02da75c..62e2e80 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--;