aboutsummaryrefslogtreecommitdiffstats
path: root/mm
diff options
context:
space:
mode:
authorHugh Dickins <hugh@veritas.com>2005-01-07 21:59:23 -0800
committerLinus Torvalds <torvalds@evo.osdl.org>2005-01-07 21:59:23 -0800
commitd5c772ed9d8de5097e3dbfd7b42bd1141084c9d0 (patch)
tree5d8121688b16f615ce87ad18f920188fdfe47d15 /mm
parent0b5d68317267e12a7876f7d5a3ac3c8929957389 (diff)
downloadhistory-d5c772ed9d8de5097e3dbfd7b42bd1141084c9d0.tar.gz
[PATCH] vmtrunc: bug if page_mapped
If unmap_mapping_range (and mapping->truncate_count) are doing their jobs right, truncate_complete_page should never find the page mapped: add BUG_ON for our immediate testing, but this patch should probably not go to mainline - a mapped page here is not a catastrophe. Signed-off-by: Hugh Dickins <hugh@veritas.com> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Diffstat (limited to 'mm')
-rw-r--r--mm/truncate.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/mm/truncate.c b/mm/truncate.c
index 7cd2ed501bb2f2..733aa033678dd9 100644
--- a/mm/truncate.c
+++ b/mm/truncate.c
@@ -45,6 +45,7 @@ static inline void truncate_partial_page(struct page *page, unsigned partial)
static void
truncate_complete_page(struct address_space *mapping, struct page *page)
{
+ BUG_ON(page_mapped(page));
if (page->mapping != mapping)
return;