aboutsummaryrefslogtreecommitdiffstats
path: root/fs/ocfs2
diff options
context:
space:
mode:
Diffstat (limited to 'fs/ocfs2')
-rw-r--r--fs/ocfs2/resize.c9
1 files changed, 6 insertions, 3 deletions
diff --git a/fs/ocfs2/resize.c b/fs/ocfs2/resize.c
index 376750f7883e..822ebc10f281 100644
--- a/fs/ocfs2/resize.c
+++ b/fs/ocfs2/resize.c
@@ -514,7 +514,7 @@ int ocfs2_group_add(struct inode *inode, struct ocfs2_new_group_input *input)
514 ret = ocfs2_verify_group_and_input(main_bm_inode, fe, input, group_bh); 514 ret = ocfs2_verify_group_and_input(main_bm_inode, fe, input, group_bh);
515 if (ret) { 515 if (ret) {
516 mlog_errno(ret); 516 mlog_errno(ret);
517 goto out_unlock; 517 goto out_free_group_bh;
518 } 518 }
519 519
520 trace_ocfs2_group_add((unsigned long long)input->group, 520 trace_ocfs2_group_add((unsigned long long)input->group,
@@ -524,7 +524,7 @@ int ocfs2_group_add(struct inode *inode, struct ocfs2_new_group_input *input)
524 if (IS_ERR(handle)) { 524 if (IS_ERR(handle)) {
525 mlog_errno(PTR_ERR(handle)); 525 mlog_errno(PTR_ERR(handle));
526 ret = -EINVAL; 526 ret = -EINVAL;
527 goto out_unlock; 527 goto out_free_group_bh;
528 } 528 }
529 529
530 cl_bpc = le16_to_cpu(fe->id2.i_chain.cl_bpc); 530 cl_bpc = le16_to_cpu(fe->id2.i_chain.cl_bpc);
@@ -577,8 +577,11 @@ int ocfs2_group_add(struct inode *inode, struct ocfs2_new_group_input *input)
577 577
578out_commit: 578out_commit:
579 ocfs2_commit_trans(osb, handle); 579 ocfs2_commit_trans(osb, handle);
580out_unlock: 580
581out_free_group_bh:
581 brelse(group_bh); 582 brelse(group_bh);
583
584out_unlock:
582 brelse(main_bm_bh); 585 brelse(main_bm_bh);
583 586
584 ocfs2_inode_unlock(main_bm_inode, 1); 587 ocfs2_inode_unlock(main_bm_inode, 1);