Btrfs: ctree: reduce args where only fs_info used
authorDaniel Dressler <danieru.dressler@gmail.com>
Wed, 12 Nov 2014 04:43:09 +0000 (13:43 +0900)
committerDavid Sterba <dsterba@suse.cz>
Mon, 16 Feb 2015 17:48:43 +0000 (18:48 +0100)
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>
fs/btrfs/ctree.c
fs/btrfs/ctree.h
fs/btrfs/file-item.c
fs/btrfs/file.c

Simple merge
Simple merge
Simple merge
diff --cc fs/btrfs/file.c
Simple merge