Skip to contentSkip to conversation

ext4: remove redundant code in ext4_fill_super()

PATCH In review Li Zefan 2 participants 2 messages May 30, 2008 ext4 file system

lore
Share & tools
lore

Li Zefan

author
#0 lore raw

PATCH 1/1 ext4: remove redundant code in ext4_fill_super()

The previous sb_min_blocksize() has already set the block size.

This piece of code was introduced in commit:

	afc7cbca5bfd556c3e12d3acefbee5ab0cbd4670
	(ext4: Support large blocksize up to PAGESIZE)

And it should be a mistake.

---
 fs/ext4/super.c |    5 -----
 1 files changed, 0 insertions(+), 5 deletions(-)
fs/ext4/super.c +0 -4
index 09d9359..5d07aa9 100644
@@ -1843,11 +1843,6 @@ static int ext4_fill_super (struct super_block *sb, void *data, int silent)
 		goto out_fail;
 	}
 
-	if (!sb_set_blocksize(sb, blocksize)) {
-		printk(KERN_ERR "EXT4-fs: bad blocksize %d.\n", blocksize);
-		goto out_fail;
-	}
#1 lore raw
Quoted 7 lines · Li Zefan

The previous sb_min_blocksize() has already set the block size.

This piece of code was introduced in commit:

	afc7cbca5bfd556c3e12d3acefbee5ab0cbd4670
	(ext4: Support large blocksize up to PAGESIZE)

And it should be a mistake.

Added to ext4 patch queue http://repo.or.cz/w/ext4-patch-queue.git

Quoted 21 lines
---
 fs/ext4/super.c |    5 -----
 1 files changed, 0 insertions(+), 5 deletions(-)
fs/ext4/super.c +0 -5
index 09d9359..5d07aa9 100644
@@ -1843,11 +1843,6 @@ static int ext4_fill_super (struct super_block *sb, void *data, int silent)
 		goto out_fail;
 	}
 
-	if (!sb_set_blocksize(sb, blocksize)) {
-		printk(KERN_ERR "EXT4-fs: bad blocksize %d.\n", blocksize);
-		goto out_fail;
-	}
-
 	/*
 	 * The ext4 superblock will not be buffer aligned for other than 1kB
 	 * block sizes.  We need to calculate the offset from buffer start.