]> git.ipfire.org Git - thirdparty/kernel/stable.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)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Fri, 5 Apr 2019 20:31:24 +0000 (22:31 +0200)
commitd245143c7a9be3211e986ec361b357d56e4cfd99
tree0cf58b6c5555c68e9700850849faf06ef6473700
parent34cc16629523f361138731fc417c8e3c10b311b6
ext4: cleanup bh release code in ext4_ind_remove_space()

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>
fs/ext4/indirect.c