btrfs-progs: check: introduce traversal function for fsck
[platform/upstream/btrfs-progs.git] / backref.c
index 4bbbb1e..7b3b592 100644 (file)
--- a/backref.c
+++ b/backref.c
@@ -805,8 +805,7 @@ static int find_parent_nodes(struct btrfs_trans_handle *trans,
                            ref->level == 0) {
                                u32 bsz;
                                struct extent_buffer *eb;
-                               bsz = btrfs_level_size(fs_info->extent_root,
-                                                       ref->level);
+                               bsz = fs_info->extent_root->nodesize;
                                eb = read_tree_block(fs_info->extent_root,
                                                           ref->parent, bsz, 0);
                                if (!extent_buffer_uptodate(eb)) {
@@ -1579,8 +1578,8 @@ static int inode_to_path(u64 inum, u32 name_len, unsigned long name_off,
  * is has been created large enough. each path is zero-terminated and accessed
  * from ipath->fspath->val[i].
  * when it returns, there are ipath->fspath->elem_cnt number of paths available
- * in ipath->fspath->val[]. when the allocated space wasn't sufficient, the
- * number of missed paths in recored in ipath->fspath->elem_missed, otherwise,
+ * in ipath->fspath->val[]. When the allocated space wasn't sufficient, the
+ * number of missed paths is recorded in ipath->fspath->elem_missed, otherwise,
  * it's zero. ipath->fspath->bytes_missing holds the number of bytes that would
  * have been needed to return all paths.
  */