diff options
author | Miao Xie <miaox@cn.fujitsu.com> | 2013-05-15 03:48:19 -0400 |
---|---|---|
committer | Josef Bacik <jbacik@fusionio.com> | 2013-06-14 11:29:37 -0400 |
commit | cb517eabba4f109810dba2e5f37b0dcf22103065 (patch) | |
tree | 5c553813bf6fdc41df3912a1146828cba64d3b17 /fs/btrfs/volumes.h | |
parent | babbf170c781f24095336c82ebf18ad272ddb773 (diff) |
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>
Diffstat (limited to 'fs/btrfs/volumes.h')
-rw-r--r-- | fs/btrfs/volumes.h | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/fs/btrfs/volumes.h b/fs/btrfs/volumes.h index f6247e2a47f7..857acd34ccde 100644 --- a/fs/btrfs/volumes.h +++ b/fs/btrfs/volumes.h | |||
@@ -321,6 +321,7 @@ int find_free_dev_extent(struct btrfs_device *device, u64 num_bytes, | |||
321 | void btrfs_dev_stat_inc_and_print(struct btrfs_device *dev, int index); | 321 | void btrfs_dev_stat_inc_and_print(struct btrfs_device *dev, int index); |
322 | int btrfs_get_dev_stats(struct btrfs_root *root, | 322 | int btrfs_get_dev_stats(struct btrfs_root *root, |
323 | struct btrfs_ioctl_get_dev_stats *stats); | 323 | struct btrfs_ioctl_get_dev_stats *stats); |
324 | void btrfs_init_devices_late(struct btrfs_fs_info *fs_info); | ||
324 | int btrfs_init_dev_stats(struct btrfs_fs_info *fs_info); | 325 | int btrfs_init_dev_stats(struct btrfs_fs_info *fs_info); |
325 | int btrfs_run_dev_stats(struct btrfs_trans_handle *trans, | 326 | int btrfs_run_dev_stats(struct btrfs_trans_handle *trans, |
326 | struct btrfs_fs_info *fs_info); | 327 | struct btrfs_fs_info *fs_info); |