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:48:05 +0000 (17:48 +0100)
commit12a88f572d6d94b5c0b72e2d1782cc2e96ac06cf
tree7e48294afcec0211fba682db37bb50c02dfb743c
parente6b01f6a0e774b4f45759791dff5bd4f98c64226
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