]> git.hungrycats.org Git - linux/commit
Btrfs: disk-io: replace root args iff only fs_info used
authorDaniel Dressler <danieru.dressler@gmail.com>
Fri, 21 Nov 2014 08:15:07 +0000 (17:15 +0900)
committerZygo Blaxell <zblaxell@waya.furryterror.org>
Fri, 27 Mar 2015 03:30:48 +0000 (23:30 -0400)
commitc67a448241fbc12259874427f127533d25feb325
treeff55fb95e2a40a7df56f5371a16015efea3b840a
parent8172dde323f545052bfbd275e708eba99323b70e
Btrfs: disk-io: replace root args iff only fs_info used

This is the 3rd independent patch of a larger project to cleanup btrfs's
internal usage of btrfs_root. Many functions take btrfs_root only to
grab the fs_info struct.

By requiring a root these functions cause programmer overhead. That
these functions can accept any valid root is not obvious until
inspection.

This patch reduces the specificity of such functions to accept the
fs_info directly.

These patches can be applied independently and thus are not being
submitted as a patch series. There should be about 26 patches by the
project's completion. Each patch will cleanup between 1 and 34 functions
apiece.  Each patch covers a single file's functions.

This patch affects the following function(s):
  1) csum_tree_block
  2) csum_dirty_buffer
  3) check_tree_block_fsid
  4) btrfs_find_tree_block
  5) clean_tree_block

Signed-off-by: Daniel Dressler <danieru.dressler@gmail.com>
Signed-off-by: David Sterba <dsterba@suse.cz>
(cherry picked from commit 01d58472a887cba61da7b4e6dc251b5170b57e2e)
fs/btrfs/ctree.c
fs/btrfs/disk-io.c
fs/btrfs/disk-io.h
fs/btrfs/extent-tree.c
fs/btrfs/qgroup.c
fs/btrfs/tree-log.c