]> git.hungrycats.org Git - linux/commit
[PATCH] Fix direct I/O into hugetlb page
authorKenneth W. Chen <kenneth.w.chen@intel.com>
Sun, 27 Jun 2004 04:00:34 +0000 (21:00 -0700)
committerLinus Torvalds <torvalds@ppc970.osdl.org>
Sun, 27 Jun 2004 04:00:34 +0000 (21:00 -0700)
commit4736ba03c29ab2e7764e1aed9858de823f69d2ad
tree7192a6d868ecf3ad35e63012a88815002a76413d
parent081681b6e504df662a8781ac2d823e0793b5c8ce
[PATCH] Fix direct I/O into hugetlb page

Hit a kernel oops on 2.6.7 kernel when doing direct I/O to hugetlb page.

The destructor of compound page was moved into page->mapping since 2.6.6.
It got interfered with set_page_dirty() for hugetlb page: an O_DIRECT read
into first tail page of the compound page will fool set_page_dirty() to
deference page->mapping->a_ops and then kernel oops.  Patch to fix the
oops.  We do just like what bio_set_pages_dirty() does.

Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
fs/direct-io.c