diff options
author | Al Viro <viro@zeniv.linux.org.uk> | 2011-11-17 09:46:16 +0400 |
---|---|---|
committer | Al Viro <viro@zeniv.linux.org.uk> | 2012-01-09 04:34:38 +0400 |
commit | 6f07e42ee6fcc252a210781d7262f4051e9fd8f6 (patch) | |
tree | 70686d28678c69586570032c47ecdc4636c7a4f3 /fs/btrfs/disk-io.h | |
parent | 38a77db49ad8f78369dcdfb693b8e5a818a60104 (diff) | |
download | linux-6f07e42ee6fcc252a210781d7262f4051e9fd8f6.tar.xz |
btrfs: sanitizing ->fs_info, part 4
A new helper: btrfs_alloc_root(fs_info); allocates btrfs_root
and sets ->fs_info. All places allocating the suckers converted
to it. At that point we *never* reassign ->fs_info of btrfs_root;
it's set before anyone sees the address of newly allocated
struct btrfs_root and never assigned anywhere else.
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
Diffstat (limited to 'fs/btrfs/disk-io.h')
-rw-r--r-- | fs/btrfs/disk-io.h | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/fs/btrfs/disk-io.h b/fs/btrfs/disk-io.h index c99d0a8f13fa..2bb5f59ddf95 100644 --- a/fs/btrfs/disk-io.h +++ b/fs/btrfs/disk-io.h @@ -86,6 +86,8 @@ int btrfs_init_log_root_tree(struct btrfs_trans_handle *trans, int btrfs_add_log_tree(struct btrfs_trans_handle *trans, struct btrfs_root *root); +struct btrfs_root *btrfs_alloc_root(struct btrfs_fs_info *fs_info); + #ifdef CONFIG_DEBUG_LOCK_ALLOC void btrfs_init_lockdep(void); void btrfs_set_buffer_lockdep_class(u64 objectid, |