Skip to content

Commit

Permalink
mm: debug check for the fault vs invalidate race
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Nick Piggin authored and Linus Torvalds committed Jul 16, 2007
1 parent f96efd5 commit 4542681
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions mm/filemap.c
Original file line number Diff line number Diff line change
Expand Up @@ -120,6 +120,7 @@ void __remove_from_page_cache(struct page *page)
page->mapping = NULL;
mapping->nrpages--;
__dec_zone_page_state(page, NR_FILE_PAGES);
BUG_ON(page_mapped(page));
}

void remove_from_page_cache(struct page *page)
Expand Down

0 comments on commit 4542681

Please sign in to comment.