summaryrefslogtreecommitdiffstats
path: root/fs/hpfs
diff options
context:
space:
mode:
authorEric Biggers <ebiggers@google.com>2021-07-16 09:39:13 -0500
committerJaegeuk Kim <jaegeuk@kernel.org>2021-11-17 11:28:22 -0800
commit3d697a4a6b7dab8fb8a8c928b640999af3a08d87 (patch)
treef68807abdbcf9ad45ae4bb0e2c3edc6dd86b99e2 /fs/hpfs
parent3271d7eb00f1df82d9ea26b359ed065129639f7c (diff)
downloadlinux-3d697a4a6b7dab8fb8a8c928b640999af3a08d87.tar.bz2
f2fs: rework write preallocations
f2fs_write_begin() assumes that all blocks were preallocated by default unless FI_NO_PREALLOC is explicitly set. This invites data corruption, as there are cases in which not all blocks are preallocated. Commit 47501f87c61a ("f2fs: preallocate DIO blocks when forcing buffered_io") fixed one case, but there are others remaining. Fix up this logic by replacing this flag with FI_PREALLOCATED_ALL, which only gets set if all blocks for the current write were preallocated. Also clean up f2fs_preallocate_blocks(), move it to file.c, and make it handle some of the logic that was previously in write_iter() directly. Signed-off-by: Eric Biggers <ebiggers@google.com> Reviewed-by: Chao Yu <chao@kernel.org> Signed-off-by: Jaegeuk Kim <jaegeuk@kernel.org>
Diffstat (limited to 'fs/hpfs')
0 files changed, 0 insertions, 0 deletions