aboutsummaryrefslogtreecommitdiff
path: root/README
diff options
context:
space:
mode:
authorHugh Dickins <hugh@veritas.com>2007-05-04 00:52:18 +0200
committerAdrian Bunk <bunk@stusta.de>2007-05-04 00:52:18 +0200
commit0e846d67dd67e4b22a4889768f7982363e44ed26 (patch)
tree5d7d2e57d5ad944e4c491c96e44fe9264c011b5d /README
parente76e407ef9ac8b94f011b42375b9105923b41dd9 (diff)
holepunch: fix shmem_truncate_range punching too far
Miklos Szeredi observes BUG_ON(!entry) in shmem_writepage() triggered in rare circumstances, because shmem_truncate_range() erroneously removes partially truncated directory pages at the end of the range: later reclaim on pages pointing to these removed directories triggers the BUG. Indeed, and it can also cause data loss beyond the hole. Fix this as in the patch proposed by Miklos, but distinguish between "limit" (how far we need to search: ignore truncation's next_index optimization in the holepunch case - if there are races it's more consistent to act on the whole range specified) and "upper_limit" (how far we can free directory pages: generally we must be careful to keep partially punched pages, but can relax at end of file - i_size being held stable by i_mutex). Signed-off-by: Hugh Dickins <hugh@veritas.com> Signed-off-by: Adrian Bunk <bunk@stusta.de>
Diffstat (limited to 'README')
0 files changed, 0 insertions, 0 deletions