]> www.infradead.org Git - users/hch/configfs.git/commit
ext4: clean up GET_BLOCKS_PRE_IO error handling
authorEric Whitney <enwlinux@gmail.com>
Thu, 30 Apr 2020 18:53:19 +0000 (14:53 -0400)
committerTheodore Ts'o <tytso@mit.edu>
Thu, 4 Jun 2020 03:16:50 +0000 (23:16 -0400)
commit779e26517b3600830fe58933d5f97627711c9435
tree50504342694ad0f84a357bdb4da070003a624556
parentbee6cf00c7f17df27c842c169db31d53bdd775ba
ext4: clean up GET_BLOCKS_PRE_IO error handling

If the call to ext4_split_convert_extents() fails in the
EXT4_GET_BLOCKS_PRE_IO case within ext4_ext_handle_unwritten_extents(),
error out through the exit point at function end rather than jumping
through an intermediate point.  Fix the error handling in the event
ext4_split_convert_extents() returns 0, which it shouldn't do when
splitting an existing extent.  The current code returns the passed in
value of allocated (which is likely non-zero) while failing to set
m_flags, m_pblk, and m_len.

Signed-off-by: Eric Whitney <enwlinux@gmail.com>
Link: https://lore.kernel.org/r/20200430185320.23001-4-enwlinux@gmail.com
Signed-off-by: Theodore Ts'o <tytso@mit.edu>
fs/ext4/extents.c