f2fs: don't check PAGE_SIZE again in sanity_check_raw_super()
authorYangtao Li <tiny.windzz@gmail.com>
Mon, 7 Dec 2020 10:59:34 +0000 (18:59 +0800)
committerJaegeuk Kim <jaegeuk@kernel.org>
Tue, 8 Dec 2020 22:25:40 +0000 (14:25 -0800)
Many flash devices read and write a single IO based on a multiple
of 4KB, and we support only 4KB page cache size now.

Since we already check page size in init_f2fs_fs(), so remove page
size check in sanity_check_raw_super().

Signed-off-by: Yangtao Li <tiny.windzz@gmail.com>
Signed-off-by: Shaohua Liu <liush@allwinnertech.com>
Reviewed-by: Chao Yu <yuchao0@huawei.com>
Signed-off-by: Jaegeuk Kim <jaegeuk@kernel.org>
fs/f2fs/super.c

index b49eec7758d815b9712c9af862495b34acd2212b..8a82721b69ef4b1dbd540767c1f287cf5ab0625a 100644 (file)
@@ -2801,13 +2801,6 @@ static int sanity_check_raw_super(struct f2fs_sb_info *sbi,
                }
        }
 
-       /* Currently, support only 4KB page cache size */
-       if (F2FS_BLKSIZE != PAGE_SIZE) {
-               f2fs_info(sbi, "Invalid page_cache_size (%lu), supports only 4KB",
-                         PAGE_SIZE);
-               return -EFSCORRUPTED;
-       }
-
        /* Currently, support only 4KB block size */
        blocksize = 1 << le32_to_cpu(raw_super->log_blocksize);
        if (blocksize != F2FS_BLKSIZE) {