udf: Fix preallocation discarding at indirect extent boundary
authorJan Kara <jack@suse.cz>
Wed, 7 Dec 2022 16:25:10 +0000 (17:25 +0100)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 21 Dec 2022 16:36:36 +0000 (17:36 +0100)
commit63dbbd8f1499b0a161e701a04aa50148d60bd1f7
tree891d69ba271d9505b20668023cbac069bf8e29ce
parent79a97f08ae5d30bad32050b464ff1cd979a068ca
udf: Fix preallocation discarding at indirect extent boundary

commit cfe4c1b25dd6d2f056afc00b7c98bcb3dd0b1fc3 upstream.

When preallocation extent is the first one in the extent block, the
code would corrupt extent tree header instead. Fix the problem and use
udf_delete_aext() for deleting extent to avoid some code duplication.

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