jbd2: add the missing unlock_buffer() in the error path of jbd2_write_superblock()
authorzhangyi (F) <yi.zhang@huawei.com>
Sat, 20 Jun 2020 06:19:48 +0000 (14:19 +0800)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 26 Aug 2020 08:29:55 +0000 (10:29 +0200)
commit81545a2affa2b78602a1cedd8e172ea474f7c205
tree92e665b5624a82f784a782add18d00bee66a35cb
parentf9d723d0b788ca94a957bb96177b65049caaa8e5
jbd2: add the missing unlock_buffer() in the error path of jbd2_write_superblock()

commit ef3f5830b859604eda8723c26d90ab23edc027a4 upstream.

jbd2_write_superblock() is under the buffer lock of journal superblock
before ending that superblock write, so add a missing unlock_buffer() in
in the error path before submitting buffer.

Fixes: 742b06b5628f ("jbd2: check superblock mapped prior to committing")
Signed-off-by: zhangyi (F) <yi.zhang@huawei.com>
Reviewed-by: Ritesh Harjani <riteshh@linux.ibm.com>
Cc: stable@kernel.org
Link: https://lore.kernel.org/r/20200620061948.2049579-1-yi.zhang@huawei.com
Signed-off-by: Theodore Ts'o <tytso@mit.edu>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
fs/jbd2/journal.c