ext4: fix error handling code in add_new_gdb
authorDinghao Liu <dinghao.liu@zju.edu.cn>
Sat, 29 Aug 2020 02:54:02 +0000 (10:54 +0800)
committerTheodore Ts'o <tytso@mit.edu>
Sun, 18 Oct 2020 14:36:14 +0000 (10:36 -0400)
commitc9e87161cc621cbdcfc472fa0b2d81c63780c8f5
treeb4e05cb96ba9b476d44de577d6550a010f013040
parentaa2f77920b743c44e02e2dc8474bbf8bd30007a2
ext4: fix error handling code in add_new_gdb

When ext4_journal_get_write_access() fails, we should
terminate the execution flow and release n_group_desc,
iloc.bh, dind and gdb_bh.

Cc: stable@kernel.org
Signed-off-by: Dinghao Liu <dinghao.liu@zju.edu.cn>
Reviewed-by: Andreas Dilger <adilger@dilger.ca>
Link: https://lore.kernel.org/r/20200829025403.3139-1-dinghao.liu@zju.edu.cn
Signed-off-by: Theodore Ts'o <tytso@mit.edu>
fs/ext4/resize.c