Skip to content

Commit

Permalink
fs: btrfs: Do not print mount fail message when not btrfs filesystem
Browse files Browse the repository at this point in the history
Other filesystem drivers don't do this.

Signed-off-by: Marek Behún <[email protected]>
  • Loading branch information
elkablo authored and trini committed May 3, 2019
1 parent a0e92cd commit 881e020
Showing 1 changed file with 5 additions and 6 deletions.
11 changes: 5 additions & 6 deletions fs/btrfs/super.c
Original file line number Diff line number Diff line change
Expand Up @@ -198,17 +198,16 @@ int btrfs_read_superblock(void)
break;

if (btrfs_check_super_csum(raw_sb)) {
printf("%s: invalid checksum at superblock mirror %i\n",
__func__, i);
debug("%s: invalid checksum at superblock mirror %i\n",
__func__, i);
continue;
}

btrfs_super_block_to_cpu(sb);

if (sb->magic != BTRFS_MAGIC) {
printf("%s: invalid BTRFS magic 0x%016llX at "
"superblock mirror %i\n", __func__, sb->magic,
i);
debug("%s: invalid BTRFS magic 0x%016llX at "
"superblock mirror %i\n", __func__, sb->magic, i);
} else if (sb->bytenr != superblock_offsets[i]) {
printf("%s: invalid bytenr 0x%016llX (expected "
"0x%016llX) at superblock mirror %i\n",
Expand All @@ -224,7 +223,7 @@ int btrfs_read_superblock(void)
}

if (!btrfs_info.sb.generation) {
printf("%s: No valid BTRFS superblock found!\n", __func__);
debug("%s: No valid BTRFS superblock found!\n", __func__);
return -1;
}

Expand Down

0 comments on commit 881e020

Please sign in to comment.