summaryrefslogtreecommitdiffstats
path: root/fs/btrfs/tree-log.c
diff options
context:
space:
mode:
authorMiao Xie2013-05-15 09:48:19 +0200
committerJosef Bacik2013-06-14 17:29:37 +0200
commitcb517eabba4f109810dba2e5f37b0dcf22103065 (patch)
tree5c553813bf6fdc41df3912a1146828cba64d3b17 /fs/btrfs/tree-log.c
parentBtrfs: make the snap/subv deletion end more early when the fs is R/O (diff)
downloadkernel-qcow2-linux-cb517eabba4f109810dba2e5f37b0dcf22103065.tar.gz
kernel-qcow2-linux-cb517eabba4f109810dba2e5f37b0dcf22103065.tar.xz
kernel-qcow2-linux-cb517eabba4f109810dba2e5f37b0dcf22103065.zip
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/tree-log.c')
-rw-r--r--fs/btrfs/tree-log.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/fs/btrfs/tree-log.c b/fs/btrfs/tree-log.c
index c276ac9a0ec3..a59724e6c9f5 100644
--- a/fs/btrfs/tree-log.c
+++ b/fs/btrfs/tree-log.c
@@ -4016,8 +4016,7 @@ again:
if (found_key.objectid != BTRFS_TREE_LOG_OBJECTID)
break;
- log = btrfs_read_fs_root_no_radix(log_root_tree,
- &found_key);
+ log = btrfs_read_fs_root(log_root_tree, &found_key);
if (IS_ERR(log)) {
ret = PTR_ERR(log);
btrfs_error(fs_info, ret,