From 5d391d2eb36d5c5129e65ed593ec0952f749ad3c Mon Sep 17 00:00:00 2001 From: Liu Bo Date: Mon, 4 Mar 2013 16:25:38 +0000 Subject: [PATCH] --- yaml --- r: 361003 b: refs/heads/master c: e1a1267054ea9dcafd01636e52d441f809efad5e h: refs/heads/master i: 361001: bff1e02c7fa926df86c3a754a0c82b75dcdcea23 360999: ad5c3197927cbc9be2a613521633c2f579bd1cf0 v: v3 --- [refs] | 2 +- trunk/fs/btrfs/relocation.c | 9 ++++++--- 2 files changed, 7 insertions(+), 4 deletions(-) diff --git a/[refs] b/[refs] index fdbc243761c2..b42641f21791 100644 --- a/[refs] +++ b/[refs] @@ -1,2 +1,2 @@ --- -refs/heads/master: aca1bba6f9bc550a33312b28e98b3de5ddb3bb15 +refs/heads/master: e1a1267054ea9dcafd01636e52d441f809efad5e diff --git a/trunk/fs/btrfs/relocation.c b/trunk/fs/btrfs/relocation.c index 0f001c14eaf4..7d1654cf9d48 100644 --- a/trunk/fs/btrfs/relocation.c +++ b/trunk/fs/btrfs/relocation.c @@ -2848,8 +2848,10 @@ int relocate_tree_blocks(struct btrfs_trans_handle *trans, int err = 0; path = btrfs_alloc_path(); - if (!path) - return -ENOMEM; + if (!path) { + err = -ENOMEM; + goto out_path; + } rb_node = rb_first(blocks); while (rb_node) { @@ -2888,10 +2890,11 @@ int relocate_tree_blocks(struct btrfs_trans_handle *trans, rb_node = rb_next(rb_node); } out: - free_block_list(blocks); err = finish_pending_nodes(trans, rc, path, err); btrfs_free_path(path); +out_path: + free_block_list(blocks); return err; }