Btrfs: cleanup the similar code of the fs root read
authorMiao Xie <miaox@cn.fujitsu.com>
Wed, 15 May 2013 07:48:19 +0000 (07:48 +0000)
committerJosef Bacik <jbacik@fusionio.com>
Fri, 14 Jun 2013 15:29:37 +0000 (11:29 -0400)
commitcb517eabba4f109810dba2e5f37b0dcf22103065
tree5c553813bf6fdc41df3912a1146828cba64d3b17
parentbabbf170c781f24095336c82ebf18ad272ddb773
Btrfs: cleanup the similar code of the fs root read

There are several functions whose code is similar, such as
  btrfs_find_last_root()
  btrfs_read_fs_root_no_radix()

Besides that, some functions are invoked twice, it is unnecessary,
for example, we are sure that all roots which is found in
  btrfs_find_orphan_roots()
have their orphan items, so it is unnecessary to check the orphan
item again.

So cleanup it.

Signed-off-by: Miao Xie <miaox@cn.fujitsu.com>
Signed-off-by: Josef Bacik <jbacik@fusionio.com>
fs/btrfs/ctree.h
fs/btrfs/disk-io.c
fs/btrfs/disk-io.h
fs/btrfs/extent-tree.c
fs/btrfs/relocation.c
fs/btrfs/root-tree.c
fs/btrfs/tree-log.c
fs/btrfs/volumes.c
fs/btrfs/volumes.h