From: Jan Kara Date: Thu, 12 Dec 2019 10:35:58 +0000 (+0100) Subject: reiserfs: Fix spurious unlock in reiserfs_fill_super() error handling X-Git-Tag: v3.16.84~79 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=777ca27b7eca0c1e7ed6e6bdb9a8e153d718888b;p=thirdparty%2Fkernel%2Fstable.git reiserfs: Fix spurious unlock in reiserfs_fill_super() error handling commit 4d5c1adaf893b8aa52525d2b81995e949bcb3239 upstream. When we fail to allocate string for journal device name we jump to 'error' label which tries to unlock reiserfs write lock which is not held. Jump to 'error_unlocked' instead. Fixes: f32485be8397 ("reiserfs: delay reiserfs lock until journal initialization") Signed-off-by: Jan Kara Signed-off-by: Ben Hutchings --- diff --git a/fs/reiserfs/super.c b/fs/reiserfs/super.c index b2d6e9fc72aa8..ffb7612e709be 100644 --- a/fs/reiserfs/super.c +++ b/fs/reiserfs/super.c @@ -1901,7 +1901,7 @@ static int reiserfs_fill_super(struct super_block *s, void *data, int silent) if (!sbi->s_jdev) { SWARN(silent, s, "", "Cannot allocate memory for " "journal device name"); - goto error; + goto error_unlocked; } } #ifdef CONFIG_QUOTA