linux/fs/udf
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: 2c948b3f86 ("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
..
balloc.c udf: Drop freed bitmap / table support 2018-09-07 10:32:22 +02:00
dir.c
directory.c udf: Provide function for calculating dir entry length 2018-06-20 11:05:49 +02:00
ecma_167.h
file.c
ialloc.c udf: convert inode stamps to timespec64 2018-06-27 13:58:00 +02:00
inode.c udf: Fix incorrect final NOT_ALLOCATED (hole) extent length 2019-07-10 10:11:24 +02:00
Kconfig udf: Always require NLS support 2018-04-19 16:00:48 +02:00
lowlevel.c
Makefile
misc.c
namei.c udf: fix an uninitialized read bug and remove dead code 2019-04-17 13:13:24 +02:00
osta_udf.h
partition.c
super.c \n 2019-05-13 14:59:55 -07:00
symlink.c
truncate.c udf: Propagate errors from udf_truncate_extents() 2019-03-18 16:30:02 +01:00
udf_i.h udf: convert inode stamps to timespec64 2018-06-27 13:58:00 +02:00
udf_sb.h udf: Drop pack pragma from udf_sb.h 2018-09-07 10:32:23 +02:00
udfdecl.h udf: Propagate errors from udf_truncate_extents() 2019-03-18 16:30:02 +01:00
udfend.h
udftime.c udf: convert inode stamps to timespec64 2018-06-27 13:58:00 +02:00
unicode.c udf: Allow mounting volumes with incorrect identification strings 2018-11-19 10:27:59 +01:00