summaryrefslogtreecommitdiffstats
path: root/fs
diff options
context:
space:
mode:
authorAndi Kleen <ak@linux.intel.com>2010-10-22 17:40:48 +0200
committerAndi Kleen <ak@linux.intel.com>2010-10-22 17:40:48 +0200
commit46e387bbd82d438b9131e237e6e2cb55a825da49 (patch)
tree414948afd6b4d63c6ea8cc79ce022128bc1bf2eb /fs
parente9d08567ef72a2d0fb9b14dded386352d3136442 (diff)
parent3ef8fd7f720fc4f462fcdcae2fcde6f1c0536bfe (diff)
downloadop-kernel-dev-46e387bbd82d438b9131e237e6e2cb55a825da49.zip
op-kernel-dev-46e387bbd82d438b9131e237e6e2cb55a825da49.tar.gz
Merge branch 'hwpoison-hugepages' into hwpoison
Conflicts: mm/memory-failure.c
Diffstat (limited to 'fs')
-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 6e5bd42..1f7ca50 100644
--- a/fs/hugetlbfs/inode.c
+++ b/fs/hugetlbfs/inode.c
@@ -31,6 +31,7 @@
#include <linux/statfs.h>
#include <linux/security.h>
#include <linux/magic.h>
+#include <linux/migrate.h>
#include <asm/uaccess.h>
@@ -573,6 +574,19 @@ static int hugetlbfs_set_page_dirty(struct page *page)
return 0;
}
+static int hugetlbfs_migrate_page(struct address_space *mapping,
+ struct page *newpage, struct page *page)
+{
+ int rc;
+
+ rc = migrate_huge_page_move_mapping(mapping, newpage, page);
+ if (rc)
+ return rc;
+ migrate_page_copy(newpage, page);
+
+ return 0;
+}
+
static int hugetlbfs_statfs(struct dentry *dentry, struct kstatfs *buf)
{
struct hugetlbfs_sb_info *sbinfo = HUGETLBFS_SB(dentry->d_sb);
@@ -659,6 +673,7 @@ static const struct address_space_operations hugetlbfs_aops = {
.write_begin = hugetlbfs_write_begin,
.write_end = hugetlbfs_write_end,
.set_page_dirty = hugetlbfs_set_page_dirty,
+ .migratepage = hugetlbfs_migrate_page,
};
OpenPOWER on IntegriCloud