From 6ca17177ce46d6ea7bc4c4e95bf6eaf2bd5a41bd Mon Sep 17 00:00:00 2001 From: Mark Fasheh Date: Tue, 12 Jul 2011 11:10:23 -0700 Subject: [PATCH] --- yaml --- r: 262227 b: refs/heads/master c: 17e9f796bd92cddec17d781c459376f82340fa44 h: refs/heads/master i: 262225: 9a3ce8b6652b2e77f747829069f47c4f1eee0a30 262223: 6c2068a80c212796c40b1f5c74c2ce02cfaffba7 v: v3 --- [refs] | 2 +- trunk/fs/btrfs/volumes.c | 6 ++++-- 2 files changed, 5 insertions(+), 3 deletions(-) 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;