diff options
-rw-r--r-- | fs/hugetlbfs/inode.c | 5 | ||||
-rw-r--r-- | mm/hugetlb.c | 2 |
2 files changed, 6 insertions, 1 deletions
diff --git a/fs/hugetlbfs/inode.c b/fs/hugetlbfs/inode.c index 4f4cd132b571..e6bd553fdc4c 100644 --- a/fs/hugetlbfs/inode.c +++ b/fs/hugetlbfs/inode.c | |||
@@ -449,10 +449,13 @@ static int hugetlbfs_symlink(struct inode *dir, | |||
449 | } | 449 | } |
450 | 450 | ||
451 | /* | 451 | /* |
452 | * For direct-IO reads into hugetlb pages | 452 | * mark the head page dirty |
453 | */ | 453 | */ |
454 | static int hugetlbfs_set_page_dirty(struct page *page) | 454 | static int hugetlbfs_set_page_dirty(struct page *page) |
455 | { | 455 | { |
456 | struct page *head = (struct page *)page_private(page); | ||
457 | |||
458 | SetPageDirty(head); | ||
456 | return 0; | 459 | return 0; |
457 | } | 460 | } |
458 | 461 | ||
diff --git a/mm/hugetlb.c b/mm/hugetlb.c index cb362f761f17..36db012b38dd 100644 --- a/mm/hugetlb.c +++ b/mm/hugetlb.c | |||
@@ -389,6 +389,8 @@ void __unmap_hugepage_range(struct vm_area_struct *vma, unsigned long start, | |||
389 | continue; | 389 | continue; |
390 | 390 | ||
391 | page = pte_page(pte); | 391 | page = pte_page(pte); |
392 | if (pte_dirty(pte)) | ||
393 | set_page_dirty(page); | ||
392 | list_add(&page->lru, &page_list); | 394 | list_add(&page->lru, &page_list); |
393 | } | 395 | } |
394 | spin_unlock(&mm->page_table_lock); | 396 | spin_unlock(&mm->page_table_lock); |