diff options
author | Hugh Dickins <hugh@veritas.com> | 2005-01-07 21:59:23 -0800 |
---|---|---|
committer | Linus Torvalds <torvalds@evo.osdl.org> | 2005-01-07 21:59:23 -0800 |
commit | d5c772ed9d8de5097e3dbfd7b42bd1141084c9d0 (patch) | |
tree | 5d8121688b16f615ce87ad18f920188fdfe47d15 /mm | |
parent | 0b5d68317267e12a7876f7d5a3ac3c8929957389 (diff) | |
download | history-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.c | 1 |
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; |