[PATCH] ext3: remove redundant checking for small blocksize

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



The set_blocksize (which is in sb_set_blocksize) will fail
if a blocksize is too small:

	/* Size cannot be smaller than the size supported by the device */
	if (size < bdev_logical_block_size(bdev))
		return -EINVAL;

Therefore remove the checking for small blocksize before "sb_set_blocksize"
to make it consistent to ext2.

Signed-off-by: Robin Dong <sanbai@xxxxxxxxxx>
---
 fs/ext3/super.c |   14 +-------------
 1 files changed, 1 insertions(+), 13 deletions(-)

diff --git a/fs/ext3/super.c b/fs/ext3/super.c
index 3c6a9e0..ae813cd 100644
--- a/fs/ext3/super.c
+++ b/fs/ext3/super.c
@@ -1628,7 +1628,6 @@ static int ext3_fill_super (struct super_block *sb, void *data, int silent)
 	unsigned long def_mount_opts;
 	struct inode *root;
 	int blocksize;
-	int hblock;
 	int db_count;
 	int i;
 	int needs_recovery;
@@ -1761,20 +1760,9 @@ static int ext3_fill_super (struct super_block *sb, void *data, int silent)
 		goto failed_mount;
 	}
 
-	hblock = bdev_logical_block_size(sb->s_bdev);
 	if (sb->s_blocksize != blocksize) {
-		/*
-		 * Make sure the blocksize for the filesystem is larger
-		 * than the hardware sectorsize for the machine.
-		 */
-		if (blocksize < hblock) {
-			ext3_msg(sb, KERN_ERR,
-				"error: fsblocksize %d too small for "
-				"hardware sectorsize %d", blocksize, hblock);
-			goto failed_mount;
-		}
-
 		brelse (bh);
+
 		if (!sb_set_blocksize(sb, blocksize)) {
 			ext3_msg(sb, KERN_ERR,
 				"error: bad blocksize %d", blocksize);
-- 
1.7.1

--
To unsubscribe from this list: send the line "unsubscribe linux-ext4" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[Index of Archives]     [Reiser Filesystem Development]     [Ceph FS]     [Kernel Newbies]     [Security]     [Netfilter]     [Bugtraq]     [Linux FS]     [Yosemite National Park]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Samba]     [Device Mapper]     [Linux Media]

  Powered by Linux