diff options
Diffstat (limited to 'fs/btrfs/super.c')
| -rw-r--r-- | fs/btrfs/super.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/fs/btrfs/super.c b/fs/btrfs/super.c index d34b2dfc9628..f2393b390318 100644 --- a/fs/btrfs/super.c +++ b/fs/btrfs/super.c | |||
| @@ -360,6 +360,8 @@ static struct dentry *get_default_root(struct super_block *sb, | |||
| 360 | */ | 360 | */ |
| 361 | dir_id = btrfs_super_root_dir(&root->fs_info->super_copy); | 361 | dir_id = btrfs_super_root_dir(&root->fs_info->super_copy); |
| 362 | di = btrfs_lookup_dir_item(NULL, root, path, dir_id, "default", 7, 0); | 362 | di = btrfs_lookup_dir_item(NULL, root, path, dir_id, "default", 7, 0); |
| 363 | if (IS_ERR(di)) | ||
| 364 | return ERR_CAST(di); | ||
| 363 | if (!di) { | 365 | if (!di) { |
| 364 | /* | 366 | /* |
| 365 | * Ok the default dir item isn't there. This is weird since | 367 | * Ok the default dir item isn't there. This is weird since |
| @@ -390,8 +392,8 @@ setup_root: | |||
| 390 | location.offset = 0; | 392 | location.offset = 0; |
| 391 | 393 | ||
| 392 | inode = btrfs_iget(sb, &location, new_root, &new); | 394 | inode = btrfs_iget(sb, &location, new_root, &new); |
| 393 | if (!inode) | 395 | if (IS_ERR(inode)) |
| 394 | return ERR_PTR(-ENOMEM); | 396 | return ERR_CAST(inode); |
| 395 | 397 | ||
| 396 | /* | 398 | /* |
| 397 | * If we're just mounting the root most subvol put the inode and return | 399 | * If we're just mounting the root most subvol put the inode and return |
