Skip to contentSkip to conversation

f2fs: remove redundant call to set_blocksize in f2fs_fill_super

PATCH In review Namjae Jeon 1 participant 1 message Jan 12, 2013

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

PATCH 1/4 f2fs: remove redundant call to set_blocksize in f2fs_fill_super

From: Namjae Jeon <[email protected]>

Since, f2fs supports only 4KB blocksize, which is set at the beginning in f2fs_fill_super. So, we do not need to again check this blocksize setting in such case.

---
 fs/f2fs/super.c |    6 +-----
 1 file changed, 1 insertion(+), 5 deletions(-)
fs/f2fs/super.c +1 -5
index 0f2b2eb..ac127fd 100644
@@ -443,7 +443,7 @@ static int f2fs_fill_super(struct super_block *sb, void *data, int silent)
 	if (!sbi)
 		return -ENOMEM;
 
-	/* set a temporary block size */
+	/* set a block size */
 	if (!sb_set_blocksize(sb, F2FS_BLKSIZE)) {
 		f2fs_msg(sb, KERN_ERR, "unable to set blocksize");
 		goto free_sbi;
@@ -542,10 +542,6 @@ static int f2fs_fill_super(struct super_block *sb, void *data, int silent)
 	INIT_LIST_HEAD(&sbi->dir_inode_list);
 	spin_lock_init(&sbi->dir_inode_lock);
 
-	/* init super block */
-	if (!sb_set_blocksize(sb, sbi->blocksize))
-		goto free_cp;
-
 	init_orphan_info(sbi);
 
 	/* setup f2fs internal modules */
Signature · 1 line
1.7.9.5