diff options
Diffstat (limited to 'fs/btrfs/super.c')
-rw-r--r-- | fs/btrfs/super.c | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/fs/btrfs/super.c b/fs/btrfs/super.c index 0128bc369292..74ed5aae6cea 100644 --- a/fs/btrfs/super.c +++ b/fs/btrfs/super.c | |||
@@ -1148,7 +1148,7 @@ static int btrfs_fill_super(struct super_block *sb, | |||
1148 | sb->s_iflags |= SB_I_CGROUPWB; | 1148 | sb->s_iflags |= SB_I_CGROUPWB; |
1149 | err = open_ctree(sb, fs_devices, (char *)data); | 1149 | err = open_ctree(sb, fs_devices, (char *)data); |
1150 | if (err) { | 1150 | if (err) { |
1151 | pr_err("BTRFS: open_ctree failed\n"); | 1151 | btrfs_err(fs_info, "open_ctree failed"); |
1152 | return err; | 1152 | return err; |
1153 | } | 1153 | } |
1154 | 1154 | ||
@@ -1446,12 +1446,13 @@ static struct dentry *mount_subvol(const char *subvol_name, u64 subvol_objectid, | |||
1446 | 1446 | ||
1447 | if (!IS_ERR(root)) { | 1447 | if (!IS_ERR(root)) { |
1448 | struct super_block *s = root->d_sb; | 1448 | struct super_block *s = root->d_sb; |
1449 | struct btrfs_fs_info *fs_info = btrfs_sb(s); | ||
1449 | struct inode *root_inode = d_inode(root); | 1450 | struct inode *root_inode = d_inode(root); |
1450 | u64 root_objectid = BTRFS_I(root_inode)->root->root_key.objectid; | 1451 | u64 root_objectid = BTRFS_I(root_inode)->root->root_key.objectid; |
1451 | 1452 | ||
1452 | ret = 0; | 1453 | ret = 0; |
1453 | if (!is_subvolume_inode(root_inode)) { | 1454 | if (!is_subvolume_inode(root_inode)) { |
1454 | pr_err("BTRFS: '%s' is not a valid subvolume\n", | 1455 | btrfs_err(fs_info, "'%s' is not a valid subvolume", |
1455 | subvol_name); | 1456 | subvol_name); |
1456 | ret = -EINVAL; | 1457 | ret = -EINVAL; |
1457 | } | 1458 | } |
@@ -1461,8 +1462,9 @@ static struct dentry *mount_subvol(const char *subvol_name, u64 subvol_objectid, | |||
1461 | * subvolume which was passed by ID is renamed and | 1462 | * subvolume which was passed by ID is renamed and |
1462 | * another subvolume is renamed over the old location. | 1463 | * another subvolume is renamed over the old location. |
1463 | */ | 1464 | */ |
1464 | pr_err("BTRFS: subvol '%s' does not match subvolid %llu\n", | 1465 | btrfs_err(fs_info, |
1465 | subvol_name, subvol_objectid); | 1466 | "subvol '%s' does not match subvolid %llu", |
1467 | subvol_name, subvol_objectid); | ||
1466 | ret = -EINVAL; | 1468 | ret = -EINVAL; |
1467 | } | 1469 | } |
1468 | if (ret) { | 1470 | if (ret) { |