Patchwork [-next] UBIFS: fix missing unlock on error in ubifs_remount_rw()

login
register
mail settings
Submitter Wei Yongjun
Date March 18, 2013, 3:12 a.m.
Message ID <CAPgLHd8Uj4-OWahuXSMxcb4Z3siukbveTm=bWNO1toatPwwcmg@mail.gmail.com>
Download mbox | patch
Permalink /patch/228346/
State Accepted
Commit fcdd57c8902a936a616df2066d873b38ef3ed364
Headers show

Comments

Wei Yongjun - March 18, 2013, 3:12 a.m.
From: Wei Yongjun <yongjun_wei@trendmicro.com.cn>

Add the missing unlock before return from function ubifs_remount_rw()
in the error handling case.

Signed-off-by: Wei Yongjun <yongjun_wei@trendmicro.com.cn>
---
 fs/ubifs/super.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
Artem Bityutskiy - March 19, 2013, 2:07 p.m.
On Mon, 2013-03-18 at 11:12 +0800, Wei Yongjun wrote:
> From: Wei Yongjun <yongjun_wei@trendmicro.com.cn>
> 
> Add the missing unlock before return from function ubifs_remount_rw()
> in the error handling case.
> 
> Signed-off-by: Wei Yongjun <yongjun_wei@trendmicro.com.cn>

Thanks, I fixed this up in linux-ubifs.git.

Patch

diff --git a/fs/ubifs/super.c b/fs/ubifs/super.c
index f21acf0..9791b3c 100644
--- a/fs/ubifs/super.c
+++ b/fs/ubifs/super.c
@@ -1571,7 +1571,7 @@  static int ubifs_remount_rw(struct ubifs_info *c)
 	if (c->space_fixup) {
 		err = ubifs_fixup_free_space(c);
 		if (err)
-			return err;
+			goto out;
 	}
 
 	err = check_free_space(c);