udf: Do not bother looking for prealloc extents if i_lenExtents matches i_size
authorJan Kara <jack@suse.cz>
Wed, 7 Dec 2022 16:34:33 +0000 (17:34 +0100)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 21 Dec 2022 16:36:36 +0000 (17:36 +0100)
commitdf1a2596c775066675ae0d3ed5708c90da99cba9
tree5d71e030c0c026764c3de82398049720aeb94a38
parent63dbbd8f1499b0a161e701a04aa50148d60bd1f7
udf: Do not bother looking for prealloc extents if i_lenExtents matches i_size

commit 6ad53f0f71c52871202a7bf096feb2c59db33fc5 upstream.

If rounded block-rounded i_lenExtents matches block rounded i_size,
there are no preallocation extents. Do not bother walking extent linked
list.

CC: stable@vger.kernel.org
Signed-off-by: Jan Kara <jack@suse.cz>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
fs/udf/truncate.c