[PATCH 5/7] ocfs2: One function call less in ocfs2_merge_rec_right() after error detection

SF Markus Elfring
2015-02-21T19:47:29Z

From: Markus Elfring <elfring@users.sourceforge.net>
Date: Sat, 21 Feb 2015 19:23:55 +0100

The ocfs2_free_path() function was called by the ocfs2_merge_rec_right()
function even if a call of the ocfs2_get_right_path() function failed.

Return from this implementation directly after corresponding
exception handling.

Signed-off-by: Markus Elfring <elfring@users.sourceforge.net>
---
fs/ocfs2/alloc.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/fs/ocfs2/alloc.c b/fs/ocfs2/alloc.c
index 4bdc19f..2d7f76e 100644
--- a/fs/ocfs2/alloc.c
+++ b/fs/ocfs2/alloc.c
@@ -3370,7 +3370,7 @@ static int ocfs2_merge_rec_right(struct ocfs2_path *left_path,
ret = ocfs2_get_right_path(et, left_path, &right_path);
if (ret) {
mlog_errno(ret);
- goto out;
+ return ret;
}

right_el = path_leaf_el(right_path);
--
2.3.0