Commit 3627bf4503b504077332c13496cb1bd54713bcbb

Authored by Stefan Behrens
Committed by Chris Mason
1 parent eb838e73dc

Btrfs: fix that error value is changed by mistake

In iterate_inodes_from_logical() the error result from
extent_from_logical() is patched by mistake. Typically ENOENT is
patched to EINVAL because (-ENOENT & BTRFS_EXTENT_FLAG_TREE_BLOCK)
evaluates to true.

Signed-off-by: Stefan Behrens <sbehrens@giantdisaster.de>

Showing 1 changed file with 2 additions and 2 deletions Side-by-side Diff

... ... @@ -1438,10 +1438,10 @@
1438 1438 ret = extent_from_logical(fs_info, logical, path,
1439 1439 &found_key);
1440 1440 btrfs_release_path(path);
1441   - if (ret & BTRFS_EXTENT_FLAG_TREE_BLOCK)
1442   - ret = -EINVAL;
1443 1441 if (ret < 0)
1444 1442 return ret;
  1443 + if (ret & BTRFS_EXTENT_FLAG_TREE_BLOCK)
  1444 + return -EINVAL;
1445 1445  
1446 1446 extent_item_pos = logical - found_key.objectid;
1447 1447 ret = iterate_extent_inodes(fs_info, found_key.objectid,