Skip to contentSkip to conversation

Btrfs: remove dead code block

PATCH New Ilya Dryomov 1 participant 1 message Oct 12, 2011 Btrfs file system

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 Btrfs: remove dead code block

This has been effectively unreachable for years, btrfs_read_dev_super() implements this check earlier in the mount sequence.

---
 fs/btrfs/disk-io.c |    6 ------
 1 files changed, 0 insertions(+), 6 deletions(-)
fs/btrfs/disk-io.c +0 -6
index 07b3ac6..ebf99ee 100644
@@ -1910,12 +1910,6 @@ struct btrfs_root *open_ctree(struct super_block *sb,
 	sb->s_blocksize = sectorsize;
 	sb->s_blocksize_bits = blksize_bits(sectorsize);
 
-	if (strncmp((char *)(&disk_super->magic), BTRFS_MAGIC,
-		    sizeof(disk_super->magic))) {
-		printk(KERN_INFO "btrfs: valid FS not found on %s\n", sb->s_id);
-		goto fail_sb_buffer;
-	}
-
 	mutex_lock(&fs_info->chunk_mutex);
 	ret = btrfs_read_sys_array(tree_root);
 	mutex_unlock(&fs_info->chunk_mutex);
Signature · 1 line
1.7.5.4