diff options
author | Linus Torvalds <torvalds@linux-foundation.org> | 2010-06-11 17:18:47 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2010-06-11 17:18:47 -0400 |
commit | b25b550bb153626df6a48eb8583e923e3dfcf64a (patch) | |
tree | baca9843877b8b3a254cde92ac2a9072014b5621 /fs/btrfs/super.c | |
parent | eda054770e5cd0e9ee1568dfcbcf39f9ade4f545 (diff) | |
parent | 6f902af400b2499c80865c62a06fbbd15cf804fd (diff) |
Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/mason/btrfs-unstable
* 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/mason/btrfs-unstable:
Btrfs: The file argument for fsync() is never null
Btrfs: handle ERR_PTR from posix_acl_from_xattr()
Btrfs: avoid BUG when dropping root and reference in same transaction
Btrfs: prohibit a operation of changing acl's mask when noacl mount option used
Btrfs: should add a permission check for setfacl
Btrfs: btrfs_lookup_dir_item() can return ERR_PTR
Btrfs: btrfs_read_fs_root_no_name() returns ERR_PTRs
Btrfs: unwind after btrfs_start_transaction() errors
Btrfs: btrfs_iget() returns ERR_PTR
Btrfs: handle kzalloc() failure in open_ctree()
Btrfs: handle error returns from btrfs_lookup_dir_item()
Btrfs: Fix BUG_ON for fs converted from extN
Btrfs: Fix null dereference in relocation.c
Btrfs: fix remap_file_pages error
Btrfs: uninitialized data is check_path_shared()
Btrfs: fix fallocate regression
Btrfs: fix loop device on top of btrfs
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 |