lkml.org 
[lkml]   [2020]   [Feb]   [14]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
    Patch in this message
    /
    From
    Subject[PATCH AUTOSEL 4.19 096/252] reiserfs: Fix spurious unlock in reiserfs_fill_super() error handling
    Date
    From: Jan Kara <jack@suse.cz>

    [ 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 <jack@suse.cz>
    Signed-off-by: Sasha Levin <sashal@kernel.org>
    ---
    fs/reiserfs/super.c | 2 +-
    1 file changed, 1 insertion(+), 1 deletion(-)

    diff --git a/fs/reiserfs/super.c b/fs/reiserfs/super.c
    index 6280efeceb0a2..de5eda33c92a0 100644
    --- a/fs/reiserfs/super.c
    +++ b/fs/reiserfs/super.c
    @@ -1954,7 +1954,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
    --
    2.20.1
    \
     
     \ /
      Last update: 2020-02-14 18:10    [W:4.655 / U:0.068 seconds]
    ©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site