On 22.06.2018 10:53, Su Yue wrote:
> If type of extent_inline_ref found is not expected, filesystem may have
> been corrupted, should return EUCLEAN instead of EINVAL.
> No functional changes.
>
> Signed-off-by: Su Yue <suy.fnst@xxxxxxxxxxxxxx>
Reviewed-by: Nikolay Borisov <nborisov@xxxxxxxx>
> ---
> fs/btrfs/extent-tree.c | 2 +-
> fs/btrfs/relocation.c | 2 +-
> 2 files changed, 2 insertions(+), 2 deletions(-)
>
> diff --git a/fs/btrfs/extent-tree.c b/fs/btrfs/extent-tree.c
> index 3d9fe58c0080..05d50c3a594e 100644
> --- a/fs/btrfs/extent-tree.c
> +++ b/fs/btrfs/extent-tree.c
> @@ -1727,7 +1727,7 @@ int lookup_inline_extent_backref(struct btrfs_trans_handle *trans,
> 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;
> }
>
> diff --git a/fs/btrfs/relocation.c b/fs/btrfs/relocation.c
> index 879b76fa881a..7c9855e8ae6f 100644
> --- a/fs/btrfs/relocation.c
> +++ b/fs/btrfs/relocation.c
> @@ -3801,7 +3801,7 @@ int add_data_references(struct reloc_control *rc,
> ret = find_data_references(rc, extent_key,
> eb, dref, blocks);
> } else {
> - ret = -EINVAL;
> + ret = -EUCLEAN;
> btrfs_err(rc->extent_root->fs_info,
> "extent %llu slot %d has an invalid inline ref type",
> eb->start, path->slots[0]);
>
--
To unsubscribe from this list: send the line "unsubscribe linux-btrfs" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html