summaryrefslogtreecommitdiffstats
path: root/fs/btrfs/backref.c
diff options
context:
space:
mode:
authorStefan Behrens <sbehrens@giantdisaster.de>2012-08-01 04:28:01 -0600
committerChris Mason <chris.mason@oracle.com>2012-08-28 16:53:28 -0400
commit3627bf4503b504077332c13496cb1bd54713bcbb (patch)
treed6b523f51c81ba3c6a705be541b6834cdbdec3b5 /fs/btrfs/backref.c
parenteb838e73dc2121d2bae47d5678952cd7d48793b5 (diff)
downloadblackbird-obmc-linux-3627bf4503b504077332c13496cb1bd54713bcbb.tar.gz
blackbird-obmc-linux-3627bf4503b504077332c13496cb1bd54713bcbb.zip
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>
Diffstat (limited to 'fs/btrfs/backref.c')
-rw-r--r--fs/btrfs/backref.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/fs/btrfs/backref.c b/fs/btrfs/backref.c
index a256f3b2a845..ff6475f409d6 100644
--- a/fs/btrfs/backref.c
+++ b/fs/btrfs/backref.c
@@ -1438,10 +1438,10 @@ int iterate_inodes_from_logical(u64 logical, struct btrfs_fs_info *fs_info,
ret = extent_from_logical(fs_info, logical, path,
&found_key);
btrfs_release_path(path);
- if (ret & BTRFS_EXTENT_FLAG_TREE_BLOCK)
- ret = -EINVAL;
if (ret < 0)
return ret;
+ if (ret & BTRFS_EXTENT_FLAG_TREE_BLOCK)
+ return -EINVAL;
extent_item_pos = logical - found_key.objectid;
ret = iterate_extent_inodes(fs_info, found_key.objectid,
OpenPOWER on IntegriCloud