diff options
author | Liu Bo <bo.li.liu@oracle.com> | 2017-08-18 15:15:22 -0600 |
---|---|---|
committer | David Sterba <dsterba@suse.com> | 2017-08-21 17:47:43 +0200 |
commit | b14c55a191263889c379aeee85223bb72501824d (patch) | |
tree | 8cccacaf4359f741abd980c901ee13c185c1261a /fs/btrfs | |
parent | 07638ea5987e51715b35eb5a9a9e908f18ffabf7 (diff) | |
download | op-kernel-dev-b14c55a191263889c379aeee85223bb72501824d.zip op-kernel-dev-b14c55a191263889c379aeee85223bb72501824d.tar.gz |
Btrfs: remove BUG() in add_data_reference
Now that we have a helper to report invalid value of extent inline ref
type, we need to quit gracefully instead of throwing out a kernel panic.
Signed-off-by: Liu Bo <bo.li.liu@oracle.com>
Reviewed-by: David Sterba <dsterba@suse.com>
Signed-off-by: David Sterba <dsterba@suse.com>
Diffstat (limited to 'fs/btrfs')
-rw-r--r-- | fs/btrfs/relocation.c | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/fs/btrfs/relocation.c b/fs/btrfs/relocation.c index 96f816a..1c086d0 100644 --- a/fs/btrfs/relocation.c +++ b/fs/btrfs/relocation.c @@ -3772,7 +3772,10 @@ int add_data_references(struct reloc_control *rc, ret = find_data_references(rc, extent_key, eb, dref, blocks); } else { - BUG(); + ret = -EINVAL; + btrfs_err(rc->extent_root->fs_info, + "extent %llu slot %d has an invalid inline ref type", + eb->start, path->slots[0]); } if (ret) { err = ret; |