diff --git a/[refs] b/[refs] index e148ca01be5e..7ce0a261fbc2 100644 --- a/[refs] +++ b/[refs] @@ -1,2 +1,2 @@ --- -refs/heads/master: 1748f843a0190ef4332d03a64263f383af72682b +refs/heads/master: 17e9f796bd92cddec17d781c459376f82340fa44 diff --git a/trunk/fs/btrfs/volumes.c b/trunk/fs/btrfs/volumes.c index 19450bc53632..530a2fcea1ef 100644 --- a/trunk/fs/btrfs/volumes.c +++ b/trunk/fs/btrfs/volumes.c @@ -2061,8 +2061,10 @@ int btrfs_balance(struct btrfs_root *dev_root) /* step two, relocate all the chunks */ path = btrfs_alloc_path(); - BUG_ON(!path); - + if (!path) { + ret = -ENOMEM; + goto error; + } key.objectid = BTRFS_FIRST_CHUNK_TREE_OBJECTID; key.offset = (u64)-1; key.type = BTRFS_CHUNK_ITEM_KEY;