btrfs: return EUCLEAN if extent_inline_ref type is invalid
[sfrench/cifs-2.6.git] / fs / btrfs / backref.c
index 0a8e2e29a66b14b515e17ce9af85b6f7a6361c31..60f4afa8ecbc0273c855e365437b09638d16e93c 100644 (file)
@@ -925,7 +925,7 @@ static int add_inline_refs(const struct btrfs_fs_info *fs_info,
                type = btrfs_get_extent_inline_ref_type(leaf, iref,
                                                        BTRFS_REF_TYPE_ANY);
                if (type == BTRFS_REF_TYPE_INVALID)
-                       return -EINVAL;
+                       return -EUCLEAN;
 
                offset = btrfs_extent_inline_ref_offset(leaf, iref);
 
@@ -1793,7 +1793,7 @@ static int get_extent_inline_ref(unsigned long *ptr,
        *out_type = btrfs_get_extent_inline_ref_type(eb, *out_eiref,
                                                     BTRFS_REF_TYPE_ANY);
        if (*out_type == BTRFS_REF_TYPE_INVALID)
-               return -EINVAL;
+               return -EUCLEAN;
 
        *ptr += btrfs_extent_inline_ref_size(*out_type);
        WARN_ON(*ptr > end);