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/disk-io.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/disk-io.c')
-rw-r--r-- | fs/btrfs/disk-io.c | 11 |
1 files changed, 9 insertions, 2 deletions
diff --git a/fs/btrfs/disk-io.c b/fs/btrfs/disk-io.c index f3b287c22caf..34f7c375567e 100644 --- a/fs/btrfs/disk-io.c +++ b/fs/btrfs/disk-io.c | |||
@@ -1941,8 +1941,11 @@ struct btrfs_root *open_ctree(struct super_block *sb, | |||
1941 | btrfs_level_size(tree_root, | 1941 | btrfs_level_size(tree_root, |
1942 | btrfs_super_log_root_level(disk_super)); | 1942 | btrfs_super_log_root_level(disk_super)); |
1943 | 1943 | ||
1944 | log_tree_root = kzalloc(sizeof(struct btrfs_root), | 1944 | log_tree_root = kzalloc(sizeof(struct btrfs_root), GFP_NOFS); |
1945 | GFP_NOFS); | 1945 | if (!log_tree_root) { |
1946 | err = -ENOMEM; | ||
1947 | goto fail_trans_kthread; | ||
1948 | } | ||
1946 | 1949 | ||
1947 | __setup_root(nodesize, leafsize, sectorsize, stripesize, | 1950 | __setup_root(nodesize, leafsize, sectorsize, stripesize, |
1948 | log_tree_root, fs_info, BTRFS_TREE_LOG_OBJECTID); | 1951 | log_tree_root, fs_info, BTRFS_TREE_LOG_OBJECTID); |
@@ -1982,6 +1985,10 @@ struct btrfs_root *open_ctree(struct super_block *sb, | |||
1982 | fs_info->fs_root = btrfs_read_fs_root_no_name(fs_info, &location); | 1985 | fs_info->fs_root = btrfs_read_fs_root_no_name(fs_info, &location); |
1983 | if (!fs_info->fs_root) | 1986 | if (!fs_info->fs_root) |
1984 | goto fail_trans_kthread; | 1987 | goto fail_trans_kthread; |
1988 | if (IS_ERR(fs_info->fs_root)) { | ||
1989 | err = PTR_ERR(fs_info->fs_root); | ||
1990 | goto fail_trans_kthread; | ||
1991 | } | ||
1985 | 1992 | ||
1986 | if (!(sb->s_flags & MS_RDONLY)) { | 1993 | if (!(sb->s_flags & MS_RDONLY)) { |
1987 | down_read(&fs_info->cleanup_work_sem); | 1994 | down_read(&fs_info->cleanup_work_sem); |