diff options
-rw-r--r-- | fs/btrfs/volumes.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/fs/btrfs/volumes.c b/fs/btrfs/volumes.c index 19450bc53632..530a2fcea1ef 100644 --- a/fs/btrfs/volumes.c +++ b/fs/btrfs/volumes.c | |||
@@ -2061,8 +2061,10 @@ int btrfs_balance(struct btrfs_root *dev_root) | |||
2061 | 2061 | ||
2062 | /* step two, relocate all the chunks */ | 2062 | /* step two, relocate all the chunks */ |
2063 | path = btrfs_alloc_path(); | 2063 | path = btrfs_alloc_path(); |
2064 | BUG_ON(!path); | 2064 | if (!path) { |
2065 | 2065 | ret = -ENOMEM; | |
2066 | goto error; | ||
2067 | } | ||
2066 | key.objectid = BTRFS_FIRST_CHUNK_TREE_OBJECTID; | 2068 | key.objectid = BTRFS_FIRST_CHUNK_TREE_OBJECTID; |
2067 | key.offset = (u64)-1; | 2069 | key.offset = (u64)-1; |
2068 | key.type = BTRFS_CHUNK_ITEM_KEY; | 2070 | key.type = BTRFS_CHUNK_ITEM_KEY; |