Steven J. Magnani fa33cdbf3e udf: Fix incorrect final NOT_ALLOCATED (hole) extent length
In some cases, using the 'truncate' command to extend a UDF file results
in a mismatch between the length of the file's extents (specifically, due
to incorrect length of the final NOT_ALLOCATED extent) and the information
(file) length. The discrepancy can prevent other operating systems
(i.e., Windows 10) from opening the file.

Two particular errors have been observed when extending a file:

1. The final extent is larger than it should be, having been rounded up
   to a multiple of the block size.

B. The final extent is not shorter than it should be, due to not having
   been updated when the file's information length was increased.

[JK: simplified udf_do_extend_final_block(), fixed up some types]

Fixes: 2c948b3f86e5 ("udf: Avoid IO in udf_clear_inode")
CC: stable@vger.kernel.org
Signed-off-by: Steven J. Magnani <steve@digidescorp.com>
Link: https://lore.kernel.org/r/1561948775-5878-1-git-send-email-steve@digidescorp.com
Signed-off-by: Jan Kara <jack@suse.cz>
2019-07-10 10:11:24 +02:00
..
2019-05-01 22:43:23 -04:00
2019-05-01 22:43:23 -04:00
2019-05-01 22:43:24 -04:00
2019-05-07 18:14:36 -07:00
2019-05-16 16:24:01 -07:00
2019-05-16 11:46:58 -07:00
2019-05-01 22:43:24 -04:00
2019-05-14 08:55:43 -07:00
2019-05-14 08:59:14 -07:00
2019-05-01 22:43:24 -04:00
2019-05-01 22:43:24 -04:00
2019-05-01 22:43:24 -04:00
2019-05-01 22:43:24 -04:00
2019-05-10 21:15:47 -04:00
2019-05-07 11:37:27 -07:00
2019-05-01 22:43:25 -04:00
2019-05-16 17:00:13 -07:00
2019-05-01 22:43:25 -04:00
\n
2019-05-13 15:08:16 -07:00
2019-05-01 22:43:26 -04:00
2019-05-14 09:02:14 -07:00
2019-05-01 22:43:25 -04:00
2019-05-01 22:43:25 -04:00
2019-05-01 22:43:25 -04:00
2019-05-14 09:47:48 -07:00
2019-04-08 18:21:02 -05:00
2019-03-08 14:48:40 -08:00
2019-05-16 19:10:37 -07:00
2019-05-07 18:14:36 -07:00
2019-04-09 19:20:57 -04:00
2019-04-26 11:09:55 -07:00
2019-04-06 10:48:35 -06:00