diff options
Diffstat (limited to 'fs')
| -rw-r--r-- | fs/hugetlbfs/inode.c | 15 | ||||
| -rw-r--r-- | fs/signalfd.c | 10 |
2 files changed, 25 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 | ||
| 577 | static 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 | |||
| 576 | static int hugetlbfs_statfs(struct dentry *dentry, struct kstatfs *buf) | 590 | static 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 | ||
diff --git a/fs/signalfd.c b/fs/signalfd.c index 74047304b01a..492465b451dd 100644 --- a/fs/signalfd.c +++ b/fs/signalfd.c | |||
| @@ -99,6 +99,16 @@ static int signalfd_copyinfo(struct signalfd_siginfo __user *uinfo, | |||
| 99 | #ifdef __ARCH_SI_TRAPNO | 99 | #ifdef __ARCH_SI_TRAPNO |
| 100 | err |= __put_user(kinfo->si_trapno, &uinfo->ssi_trapno); | 100 | err |= __put_user(kinfo->si_trapno, &uinfo->ssi_trapno); |
| 101 | #endif | 101 | #endif |
| 102 | #ifdef BUS_MCEERR_AO | ||
| 103 | /* | ||
| 104 | * Other callers might not initialize the si_lsb field, | ||
| 105 | * so check explicitly for the right codes here. | ||
| 106 | */ | ||
| 107 | if (kinfo->si_code == BUS_MCEERR_AR || | ||
| 108 | kinfo->si_code == BUS_MCEERR_AO) | ||
| 109 | err |= __put_user((short) kinfo->si_addr_lsb, | ||
| 110 | &uinfo->ssi_addr_lsb); | ||
| 111 | #endif | ||
| 102 | break; | 112 | break; |
| 103 | case __SI_CHLD: | 113 | case __SI_CHLD: |
| 104 | err |= __put_user(kinfo->si_pid, &uinfo->ssi_pid); | 114 | err |= __put_user(kinfo->si_pid, &uinfo->ssi_pid); |
