reiserfs: Fix spurious unlock in reiserfs_fill_super() error handling

[ Upstream commit 4d5c1adaf893b8aa52525d2b81995e949bcb3239 ]

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: f32485be83 ("reiserfs: delay reiserfs lock until journal initialization")
Signed-off-by: Jan Kara <jack@suse.cz>
Signed-off-by: Sasha Levin <sashal@kernel.org>
This commit is contained in:
Jan Kara 2019-12-12 11:35:58 +01:00 committed by Greg Kroah-Hartman
parent 6107a895e3
commit af77e76625

View File

@ -1948,7 +1948,7 @@ static int reiserfs_fill_super(struct super_block *s, void *data, int silent)
if (!sbi->s_jdev) { if (!sbi->s_jdev) {
SWARN(silent, s, "", "Cannot allocate memory for " SWARN(silent, s, "", "Cannot allocate memory for "
"journal device name"); "journal device name");
goto error; goto error_unlocked;
} }
} }
#ifdef CONFIG_QUOTA #ifdef CONFIG_QUOTA