aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorYangtao Li2020-12-07 04:59:34 -0600
committerJaegeuk Kim2020-12-21 15:33:18 -0600
commit3ee09676335209a936adbd2dec122dc560431da1 (patch)
tree1e6e75f6ab2adb946b4b126ff3628c187a37a211
parentd2aa76bd146565c3f3c66f82d9099ef60cfc2cd5 (diff)
downloadkernel-3ee09676335209a936adbd2dec122dc560431da1.tar.gz
kernel-3ee09676335209a936adbd2dec122dc560431da1.tar.xz
kernel-3ee09676335209a936adbd2dec122dc560431da1.zip
f2fs: don't check PAGE_SIZE again in sanity_check_raw_super()
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>
-rw-r--r--fs/f2fs/super.c7
1 files changed, 0 insertions, 7 deletions
diff --git a/fs/f2fs/super.c b/fs/f2fs/super.c
index b49eec7758d8..8a82721b69ef 100644
--- a/fs/f2fs/super.c
+++ b/fs/f2fs/super.c
@@ -2801,13 +2801,6 @@ static int sanity_check_raw_super(struct f2fs_sb_info *sbi,
2801 } 2801 }
2802 } 2802 }
2803 2803
2804 /* Currently, support only 4KB page cache size */
2805 if (F2FS_BLKSIZE != PAGE_SIZE) {
2806 f2fs_info(sbi, "Invalid page_cache_size (%lu), supports only 4KB",
2807 PAGE_SIZE);
2808 return -EFSCORRUPTED;
2809 }
2810
2811 /* Currently, support only 4KB block size */ 2804 /* Currently, support only 4KB block size */
2812 blocksize = 1 << le32_to_cpu(raw_super->log_blocksize); 2805 blocksize = 1 << le32_to_cpu(raw_super->log_blocksize);
2813 if (blocksize != F2FS_BLKSIZE) { 2806 if (blocksize != F2FS_BLKSIZE) {