diff options
author | Daniel Dressler <danieru.dressler@gmail.com> | 2014-11-12 07:43:09 +0300 |
---|---|---|
committer | David Sterba <dsterba@suse.cz> | 2015-02-16 20:48:43 +0300 |
commit | b7a0365ec7a0fb1d39113846fd34038af68ebd01 (patch) | |
tree | 20bc3d4adf09e22f0a7b7c2fb6b081dd60cd6d52 /fs/btrfs/ctree.h | |
parent | a742994aa2e271eb8cd8e043d276515ec858ed73 (diff) | |
download | linux-b7a0365ec7a0fb1d39113846fd34038af68ebd01.tar.xz |
Btrfs: ctree: reduce args where only fs_info used
This patch is part of a larger project to cleanup btrfs's internal usage
of struct btrfs_root. Many functions take btrfs_root only to grab a
pointer to fs_info.
This causes programmers to ponder which root can be passed. Since only
the fs_info is read affected functions can accept any root, except this
is only obvious upon inspection.
This patch reduces the specificty of such functions to accept the
fs_info directly.
This patch does not address the two functions in ctree.c (insert_ptr,
and split_item) which only use root for BUG_ONs in ctree.c
This patch affects the following functions:
1) fixup_low_keys
2) btrfs_set_item_key_safe
Signed-off-by: Daniel Dressler <danieru.dressler@gmail.com>
Signed-off-by: David Sterba <dsterba@suse.cz>
Diffstat (limited to 'fs/btrfs/ctree.h')
-rw-r--r-- | fs/btrfs/ctree.h | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/fs/btrfs/ctree.h b/fs/btrfs/ctree.h index b3dd55f52f71..216056c37940 100644 --- a/fs/btrfs/ctree.h +++ b/fs/btrfs/ctree.h @@ -3483,7 +3483,8 @@ int btrfs_previous_item(struct btrfs_root *root, int type); int btrfs_previous_extent_item(struct btrfs_root *root, struct btrfs_path *path, u64 min_objectid); -void btrfs_set_item_key_safe(struct btrfs_root *root, struct btrfs_path *path, +void btrfs_set_item_key_safe(struct btrfs_fs_info *fs_info, + struct btrfs_path *path, struct btrfs_key *new_key); struct extent_buffer *btrfs_root_node(struct btrfs_root *root); struct extent_buffer *btrfs_lock_root_node(struct btrfs_root *root); |