]> git.proxmox.com Git - mirror_ubuntu-bionic-kernel.git/commit
ext4: cleanup bh release code in ext4_ind_remove_space()
authorzhangyi (F) <yi.zhang@huawei.com>
Sat, 23 Mar 2019 15:56:01 +0000 (11:56 -0400)
committerKleber Sacilotto de Souza <kleber.souza@canonical.com>
Wed, 14 Aug 2019 09:18:49 +0000 (11:18 +0200)
commit5d4a8a430d0ccaf0cb793b8f1d6d2589ec85d985
tree9842f2a03f35ac41f7945d3709732b800270dcd4
parent325ad8cd2ec10f21da50be5d1e470c515bc141eb
ext4: cleanup bh release code in ext4_ind_remove_space()

BugLink: https://bugs.launchpad.net/bugs/1838116
commit 5e86bdda41534e17621d5a071b294943cae4376e upstream.

Currently, we are releasing the indirect buffer where we are done with
it in ext4_ind_remove_space(), so we can see the brelse() and
BUFFER_TRACE() everywhere.  It seems fragile and hard to read, and we
may probably forget to release the buffer some day.  This patch cleans
up the code by putting of the code which releases the buffers to the
end of the function.

Signed-off-by: zhangyi (F) <yi.zhang@huawei.com>
Signed-off-by: Theodore Ts'o <tytso@mit.edu>
Reviewed-by: Jan Kara <jack@suse.cz>
Cc: Jari Ruusu <jari.ruusu@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: Kamal Mostafa <kamal@canonical.com>
Signed-off-by: Khalid Elmously <khalid.elmously@canonical.com>
fs/ext4/indirect.c