On Fri, Dec 02, 2016 at 12:07:21AM -0500, je...@suse.com wrote: > From: Jeff Mahoney <je...@suse.com> > > There are 11 functions that accept a root parameter and immediately > overwrite it. We can pass those an fs_info pointer instead. > > Signed-off-by: Jeff Mahoney <je...@suse.com> > --- > fs/btrfs/ctree.h | 4 ++-- > fs/btrfs/disk-io.c | 4 ++-- > fs/btrfs/extent-tree.c | 17 +++++++------- > fs/btrfs/file-item.c | 5 ++--- > fs/btrfs/free-space-cache.c | 5 ++--- > fs/btrfs/free-space-cache.h | 2 +- > fs/btrfs/transaction.c | 9 ++++---- > fs/btrfs/tree-log.c | 6 ++--- > fs/btrfs/volumes.c | 55 > +++++++++++++++++++++------------------------ > fs/btrfs/volumes.h | 4 ++-- > 10 files changed, 52 insertions(+), 59 deletions(-) >
[snip] > int btrfs_remove_chunk(struct btrfs_trans_handle *trans, > - struct btrfs_root *root, u64 chunk_offset) > + struct btrfs_fs_info *fs_info, u64 chunk_offset) > { > + struct btrfs_root *root = fs_info->chunk_root; > struct extent_map_tree *em_tree; > struct extent_map *em; > struct btrfs_root *extent_root = root->fs_info->extent_root; > @@ -2812,8 +2811,7 @@ int btrfs_remove_chunk(struct btrfs_trans_handle *trans, > struct btrfs_fs_devices *fs_devices = root->fs_info->fs_devices; > > /* Just in case */ > - root = root->fs_info->chunk_root; > - em_tree = &root->fs_info->mapping_tree.map_tree; > + em_tree = &fs_info->mapping_tree.map_tree; I think this "Just in case" comment was referring to the reassignment of the root, so it's just confusing now. -- To unsubscribe from this list: send the line "unsubscribe linux-btrfs" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html