Skip to content

Commit

Permalink
btrfs: Fix comment in lookup_inline_extent_backref
Browse files Browse the repository at this point in the history
The comment wrongfully states that the owner parameter is the level of
the parent block. In fact owner is the level of the current block and
by adding 1 to it we can eventually get to the parent/root.

Signed-off-by: Nikolay Borisov <nborisov@suse.com>
Signed-off-by: David Sterba <dsterba@suse.com>
  • Loading branch information
Nikolay Borisov authored and David Sterba committed Aug 6, 2018
1 parent bd3c685 commit 16d1c06
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions fs/btrfs/extent-tree.c
Original file line number Diff line number Diff line change
Expand Up @@ -1635,8 +1635,8 @@ int lookup_inline_extent_backref(struct btrfs_trans_handle *trans,
extra_size = -1;

/*
* Owner is our parent level, so we can just add one to get the level
* for the block we are interested in.
* Owner is our level, so we can just add one to get the level for the
* block we are interested in.
*/
if (skinny_metadata && owner < BTRFS_FIRST_FREE_OBJECTID) {
key.type = BTRFS_METADATA_ITEM_KEY;
Expand Down

0 comments on commit 16d1c06

Please sign in to comment.