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>
Sat, 7 Jan 2023 11:07:11 +0000 (12:07 +0100)
commit1f9eae31750287bdb1e200b16016be119090a400
tree09e27cb63a833a58f5b2d11b5bd1a339f35d062b
parentc8b6fa4511a7900db9fb0353b630d4d2ed1ba99c
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