aboutsummaryrefslogtreecommitdiffstats
path: root/fs/btrfs/extent-tree.c
diff options
context:
space:
mode:
authorSu Yue <suy.fnst@cn.fujitsu.com>2018-06-22 16:18:01 +0800
committerDavid Sterba <dsterba@suse.com>2018-08-06 13:12:40 +0200
commitaf431dcb249ffff20b16e08adaa4b624405a046b (patch)
tree1dbe1dcb6d6c72ffd7fe1a587720b41e7ae0bf5e /fs/btrfs/extent-tree.c
parentbtrfs: Use iocb to derive pos instead of passing a separate parameter (diff)
downloadlinux-dev-af431dcb249ffff20b16e08adaa4b624405a046b.tar.xz
linux-dev-af431dcb249ffff20b16e08adaa4b624405a046b.zip
btrfs: return EUCLEAN if extent_inline_ref type is invalid
If type of extent_inline_ref found is not expected, filesystem may have been corrupted, should return EUCLEAN instead of EINVAL. Signed-off-by: Su Yue <suy.fnst@cn.fujitsu.com> Reviewed-by: David Sterba <dsterba@suse.com> Signed-off-by: David Sterba <dsterba@suse.com>
Diffstat (limited to 'fs/btrfs/extent-tree.c')
-rw-r--r--fs/btrfs/extent-tree.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/fs/btrfs/extent-tree.c b/fs/btrfs/extent-tree.c
index 37d8927015d9..b28fa3d20ef7 100644
--- a/fs/btrfs/extent-tree.c
+++ b/fs/btrfs/extent-tree.c
@@ -1719,7 +1719,7 @@ again:
iref = (struct btrfs_extent_inline_ref *)ptr;
type = btrfs_get_extent_inline_ref_type(leaf, iref, needed);
if (type == BTRFS_REF_TYPE_INVALID) {
- err = -EINVAL;
+ err = -EUCLEAN;
goto out;
}