udf: Do not bother merging very long extents
authorJan Kara <jack@suse.cz>
Fri, 16 Dec 2022 11:37:51 +0000 (12:37 +0100)
committerJan Kara <jack@suse.cz>
Mon, 9 Jan 2023 09:39:52 +0000 (10:39 +0100)
commit53cafe1d6d8ef9f93318e5bfccc0d24f27d41ced
tree6a50cba132ec396235b18d06ea5eb55ff331324c
parent70bfb3a8d661d4fdc742afc061b88a7f3fc9f500
udf: Do not bother merging very long extents

When merging very long extents we try to push as much length as possible
to the first extent. However this is unnecessarily complicated and not
really worth the trouble. Furthermore there was a bug in the logic
resulting in corrupting extents in the file as syzbot reproducer shows.
So just don't bother with the merging of extents that are too long
together.

CC: stable@vger.kernel.org
Reported-by: syzbot+60f291a24acecb3c2bd5@syzkaller.appspotmail.com
Signed-off-by: Jan Kara <jack@suse.cz>
fs/udf/inode.c