aboutsummaryrefslogtreecommitdiffstats
path: root/fs/hugetlbfs
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@linux-foundation.org>2010-10-26 13:13:10 -0400
committerLinus Torvalds <torvalds@linux-foundation.org>2010-10-26 13:13:10 -0400
commitf1ebdd60cc73ed36fd977f7e719ce70d2f5cd1c0 (patch)
tree225cb2ea2c0f8990f29383058a07206cfd835893 /fs/hugetlbfs
parentf99d055398d53c8f769d5153b3fdce1d2556e7ff (diff)
parent46e387bbd82d438b9131e237e6e2cb55a825da49 (diff)
Merge branch 'hwpoison' of git://git.kernel.org/pub/scm/linux/kernel/git/ak/linux-mce-2.6
* 'hwpoison' of git://git.kernel.org/pub/scm/linux/kernel/git/ak/linux-mce-2.6: (22 commits) Add _addr_lsb field to ia64 siginfo Fix migration.c compilation on s390 HWPOISON: Remove retry loop for try_to_unmap HWPOISON: Turn addr_valid from bitfield into char HWPOISON: Disable DEBUG by default HWPOISON: Convert pr_debugs to pr_info HWPOISON: Improve comments in memory-failure.c x86: HWPOISON: Report correct address granuality for huge hwpoison faults Encode huge page size for VM_FAULT_HWPOISON errors Fix build error with !CONFIG_MIGRATION hugepage: move is_hugepage_on_freelist inside ifdef to avoid warning Clean up __page_set_anon_rmap HWPOISON, hugetlb: fix unpoison for hugepage HWPOISON, hugetlb: soft offlining for hugepage HWPOSION, hugetlb: recover from free hugepage error when !MF_COUNT_INCREASED hugetlb: move refcounting in hugepage allocation inside hugetlb_lock HWPOISON, hugetlb: add free check to dequeue_hwpoison_huge_page() hugetlb: hugepage migration core hugetlb: redefine hugepage copy functions hugetlb: add allocate function for hugepage migration ...
Diffstat (limited to 'fs/hugetlbfs')
-rw-r--r--fs/hugetlbfs/inode.c15
1 files changed, 15 insertions, 0 deletions
diff --git a/fs/hugetlbfs/inode.c b/fs/hugetlbfs/inode.c
index 113eba3d3c38..a14328d270e8 100644
--- a/fs/hugetlbfs/inode.c
+++ b/fs/hugetlbfs/inode.c
@@ -31,6 +31,7 @@
31#include <linux/statfs.h> 31#include <linux/statfs.h>
32#include <linux/security.h> 32#include <linux/security.h>
33#include <linux/magic.h> 33#include <linux/magic.h>
34#include <linux/migrate.h>
34 35
35#include <asm/uaccess.h> 36#include <asm/uaccess.h>
36 37
@@ -573,6 +574,19 @@ static int hugetlbfs_set_page_dirty(struct page *page)
573 return 0; 574 return 0;
574} 575}
575 576
577static int hugetlbfs_migrate_page(struct address_space *mapping,
578 struct page *newpage, struct page *page)
579{
580 int rc;
581
582 rc = migrate_huge_page_move_mapping(mapping, newpage, page);
583 if (rc)
584 return rc;
585 migrate_page_copy(newpage, page);
586
587 return 0;
588}
589
576static int hugetlbfs_statfs(struct dentry *dentry, struct kstatfs *buf) 590static int hugetlbfs_statfs(struct dentry *dentry, struct kstatfs *buf)
577{ 591{
578 struct hugetlbfs_sb_info *sbinfo = HUGETLBFS_SB(dentry->d_sb); 592 struct hugetlbfs_sb_info *sbinfo = HUGETLBFS_SB(dentry->d_sb);
@@ -659,6 +673,7 @@ static const struct address_space_operations hugetlbfs_aops = {
659 .write_begin = hugetlbfs_write_begin, 673 .write_begin = hugetlbfs_write_begin,
660 .write_end = hugetlbfs_write_end, 674 .write_end = hugetlbfs_write_end,
661 .set_page_dirty = hugetlbfs_set_page_dirty, 675 .set_page_dirty = hugetlbfs_set_page_dirty,
676 .migratepage = hugetlbfs_migrate_page,
662}; 677};
663 678
664 679