udf: Fix off-by-one error when discarding preallocation
authorJan Kara <jack@suse.cz>
Mon, 23 Jan 2023 13:29:15 +0000 (14:29 +0100)
committerJan Kara <jack@suse.cz>
Thu, 26 Jan 2023 15:46:35 +0000 (16:46 +0100)
commitf54aa97fb7e5329a373f9df4e5e213ced4fc8759
treef2e7fd25749f236375d633e9e3bacb815422d166
parent36ec52ea038b18a53e198116ef7d7e70c87db046
udf: Fix off-by-one error when discarding preallocation

The condition determining whether the preallocation can be used had
an off-by-one error so we didn't discard preallocation when new
allocation was just following it. This can then confuse code in
inode_getblk().

CC: stable@vger.kernel.org
Fixes: 16d055656814 ("udf: Discard preallocation before extending file with a hole")
Signed-off-by: Jan Kara <jack@suse.cz>
fs/udf/inode.c