• Kenneth W. Chen's avatar
    [PATCH] Fix direct I/O into hugetlb page · 4736ba03
    Kenneth W. Chen authored
    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: default avatarAndrew Morton <akpm@osdl.org>
    Signed-off-by: default avatarLinus Torvalds <torvalds@osdl.org>
    4736ba03
direct-io.c 32.1 KB