Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit ae663d46 authored by Linux Build Service Account's avatar Linux Build Service Account Committed by Gerrit - the friendly Code Review server
Browse files

Merge "BACKPORT: f2fs: sanity check log_blocks_per_seg"

parents ef83d92e d7b6e8af
Loading
Loading
Loading
Loading
+8 −0
Original line number Diff line number Diff line
@@ -1454,6 +1454,14 @@ static int sanity_check_raw_super(struct f2fs_sb_info *sbi,
		return 1;
	}

	/* check log blocks per segment */
	if (le32_to_cpu(raw_super->log_blocks_per_seg) != 9) {
		f2fs_msg(sb, KERN_INFO,
			"Invalid log blocks per segment (%u)\n",
			le32_to_cpu(raw_super->log_blocks_per_seg));
		return 1;
	}

	/* Currently, support 512/1024/2048/4096 bytes sector size */
	if (le32_to_cpu(raw_super->log_sectorsize) >
				F2FS_MAX_LOG_SECTOR_SIZE ||