diff options
-rw-r--r-- | fs/btrfs/volumes.c | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/fs/btrfs/volumes.c b/fs/btrfs/volumes.c index e2de7c7b674a..c7a08fe26672 100644 --- a/fs/btrfs/volumes.c +++ b/fs/btrfs/volumes.c | |||
@@ -1849,7 +1849,12 @@ static noinline int find_next_devid(struct btrfs_fs_info *fs_info, | |||
1849 | if (ret < 0) | 1849 | if (ret < 0) |
1850 | goto error; | 1850 | goto error; |
1851 | 1851 | ||
1852 | BUG_ON(ret == 0); /* Corruption */ | 1852 | if (ret == 0) { |
1853 | /* Corruption */ | ||
1854 | btrfs_err(fs_info, "corrupted chunk tree devid -1 matched"); | ||
1855 | ret = -EUCLEAN; | ||
1856 | goto error; | ||
1857 | } | ||
1853 | 1858 | ||
1854 | ret = btrfs_previous_item(fs_info->chunk_root, path, | 1859 | ret = btrfs_previous_item(fs_info->chunk_root, path, |
1855 | BTRFS_DEV_ITEMS_OBJECTID, | 1860 | BTRFS_DEV_ITEMS_OBJECTID, |