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: v5.5.6~254 X-Git-Url: https://www.infradead.org/git/?a=commitdiff_plain;h=b86a985b7960808b46c8f1b90e94925dadb56af6;p=users%2Fdwmw2%2Flinux.git 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: f32485be8397 ("reiserfs: delay reiserfs lock until journal initialization") Signed-off-by: Jan Kara Signed-off-by: Sasha Levin --- diff --git a/fs/reiserfs/super.c b/fs/reiserfs/super.c index d127af64283e3..a6bce5b1fb1dc 100644 --- a/fs/reiserfs/super.c +++ b/fs/reiserfs/super.c @@ -1948,7 +1948,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