aboutsummaryrefslogtreecommitdiff
path: root/Documentation/filesystems/caching/backend-api.rst
diff options
context:
space:
mode:
authorHugh Dickins <[email protected]>2022-12-04 16:51:50 -0800
committerAndrew Morton <[email protected]>2022-12-09 18:41:16 -0800
commit44bcabd70cf1425b4243e02251c02b01638a8287 (patch)
tree161340d0e58642c08678989c972b19a8299a8705 /Documentation/filesystems/caching/backend-api.rst
parentde16d6e4a9fb13d07c88d0e57754348662f53b23 (diff)
tmpfs: fix data loss from failed fallocate
Fix tmpfs data loss when the fallocate system call is interrupted by a signal, or fails for some other reason. The partial folio handling in shmem_undo_range() forgot to consider this unfalloc case, and was liable to erase or truncate out data which had already been committed earlier. It turns out that none of the partial folio handling there is appropriate for the unfalloc case, which just wants to proceed to removal of whole folios: which find_get_entries() provides, even when partially covered. Original patch by Rui Wang. Link: https://lore.kernel.org/linux-mm/[email protected]/ Link: https://lkml.kernel.org/r/[email protected] Fixes: b9a8a4195c7d ("truncate,shmem: Handle truncates that split large folios") Signed-off-by: Hugh Dickins <[email protected]> Reported-by: Guoqi Chen <[email protected]> Link: https://lore.kernel.org/all/[email protected]/ Cc: Rui Wang <[email protected]> Cc: Huacai Chen <[email protected]> Cc: Matthew Wilcox <[email protected]> Cc: Vishal Moola (Oracle) <[email protected]> Cc: <[email protected]> [5.17+] Signed-off-by: Andrew Morton <[email protected]>
Diffstat (limited to 'Documentation/filesystems/caching/backend-api.rst')
0 files changed, 0 insertions, 0 deletions