diff options
author | Nick Piggin <npiggin@suse.de> | 2007-07-16 02:38:12 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@woody.linux-foundation.org> | 2007-07-16 12:05:35 -0400 |
commit | 45426812d6b601430d560cb6049757b5b0bc71c4 (patch) | |
tree | 64c8439a53f4ca402a9d7deb2a455aa0de08c8ea /mm/filemap.c | |
parent | f96efd585b8d847181f81bf16721f96ded18d9fe (diff) |
mm: debug check for the fault vs invalidate race
Add a bugcheck for Andrea's pagefault vs invalidate race. This is triggerable
for both linear and nonlinear pages with a userspace test harness (using
direct IO and truncate, respectively).
Signed-off-by: Nick Piggin <npiggin@suse.de>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'mm/filemap.c')
-rw-r--r-- | mm/filemap.c | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/mm/filemap.c b/mm/filemap.c index c6ebd9f912ab..e006c57bda54 100644 --- a/mm/filemap.c +++ b/mm/filemap.c | |||
@@ -120,6 +120,7 @@ void __remove_from_page_cache(struct page *page) | |||
120 | page->mapping = NULL; | 120 | page->mapping = NULL; |
121 | mapping->nrpages--; | 121 | mapping->nrpages--; |
122 | __dec_zone_page_state(page, NR_FILE_PAGES); | 122 | __dec_zone_page_state(page, NR_FILE_PAGES); |
123 | BUG_ON(page_mapped(page)); | ||
123 | } | 124 | } |
124 | 125 | ||
125 | void remove_from_page_cache(struct page *page) | 126 | void remove_from_page_cache(struct page *page) |