]> www.infradead.org Git - users/dwmw2/linux.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)
committerBen Hutchings <ben@decadent.org.uk>
Tue, 20 Aug 2019 18:01:56 +0000 (19:01 +0100)
commit2d74faa1f0c8a23ffb83146f23526ea812f1ef7f
treeb85587f2fb2ba4473dc99d7ac99958fa615cb41c
parentf1fbae6cd2bd84b17e399d969a2f889ac1bd9afb
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>
Signed-off-by: Ben Hutchings <ben@decadent.org.uk>
fs/ext4/indirect.c