mirror of
https://mirrors.bfsu.edu.cn/git/linux.git
synced 2024-11-25 21:24:08 +08:00
36ec52ea03
When we append new block just after the end of preallocated extent, the
code in inode_getblk() wrongly determined we're going to use the
preallocated extent which resulted in adding block into a wrong logical
offset in the file. Sequence like this manifests it:
xfs_io -f -c "pwrite 0x2cacf 0xd122" -c "truncate 0x2dd6f" \
-c "pwrite 0x27fd9 0x69a9" -c "pwrite 0x32981 0x7244" <file>
The code that determined the use of preallocated extent is actually
stale because udf_do_extend_file() does not create preallocation anymore
so after calling that function we are sure there's no usable
preallocation. Just remove the faulty condition.
CC: stable@vger.kernel.org
Fixes:
|
||
---|---|---|
.. | ||
balloc.c | ||
dir.c | ||
directory.c | ||
ecma_167.h | ||
file.c | ||
ialloc.c | ||
inode.c | ||
Kconfig | ||
lowlevel.c | ||
Makefile | ||
misc.c | ||
namei.c | ||
osta_udf.h | ||
partition.c | ||
super.c | ||
symlink.c | ||
truncate.c | ||
udf_i.h | ||
udf_sb.h | ||
udfdecl.h | ||
udfend.h | ||
udftime.c | ||
unicode.c |