mirror of
https://github.com/torvalds/linux.git
synced 2025-12-07 20:06:24 +00:00
Merge branch 'misc-fixes-4.7' of git://git.kernel.org/pub/scm/linux/kernel/git/kdave/linux into for-linus-4.7
This commit is contained in:
@@ -4133,6 +4133,17 @@ static int btrfs_check_super_valid(struct btrfs_fs_info *fs_info,
|
||||
* Hint to catch really bogus numbers, bitflips or so, more exact checks are
|
||||
* done later
|
||||
*/
|
||||
if (btrfs_super_bytes_used(sb) < 6 * btrfs_super_nodesize(sb)) {
|
||||
btrfs_err(fs_info, "bytes_used is too small %llu",
|
||||
btrfs_super_bytes_used(sb));
|
||||
ret = -EINVAL;
|
||||
}
|
||||
if (!is_power_of_2(btrfs_super_stripesize(sb)) ||
|
||||
btrfs_super_stripesize(sb) != sectorsize) {
|
||||
btrfs_err(fs_info, "invalid stripesize %u",
|
||||
btrfs_super_stripesize(sb));
|
||||
ret = -EINVAL;
|
||||
}
|
||||
if (btrfs_super_num_devices(sb) > (1UL << 31))
|
||||
printk(KERN_WARNING "BTRFS: suspicious number of devices: %llu\n",
|
||||
btrfs_super_num_devices(sb));
|
||||
|
||||
Reference in New Issue
Block a user