reiserfs: Fix spurious unlock in reiserfs_fill_super() error handling
authorJan Kara <jack@suse.cz>
Thu, 12 Dec 2019 10:35:58 +0000 (11:35 +0100)
committerJan Kara <jack@suse.cz>
Mon, 16 Dec 2019 11:59:32 +0000 (12:59 +0100)
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 <jack@suse.cz>
fs/reiserfs/super.c

index d127af6..a6bce5b 100644 (file)
@@ -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