aboutsummaryrefslogtreecommitdiffstats
path: root/fs/hugetlbfs/inode.c
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@linux-foundation.org>2017-11-03 12:03:50 -0400
committerLinus Torvalds <torvalds@linux-foundation.org>2017-11-03 12:03:50 -0400
commitf0395d5b4d691164a6e4d107590636db80b29bf6 (patch)
tree6a362f035c703d3d1719deb2ae6c9cd8ce8ca671 /fs/hugetlbfs/inode.c
parentfb615d61b5583db92e3793709b97e35dc9499c2a (diff)
parent2628bd6fc052bd85e9864dae4de494d8a6313391 (diff)
Merge branch 'akpm' (patches from Andrew)
Merge misc fixes from Andrew Morton: "7 fixes" * emailed patches from Andrew Morton <akpm@linux-foundation.org>: mm, swap: fix race between swap count continuation operations mm/huge_memory.c: deposit page table when copying a PMD migration entry initramfs: fix initramfs rebuilds w/ compression after disabling fs/hugetlbfs/inode.c: fix hwpoison reserve accounting ocfs2: fstrim: Fix start offset of first cluster group during fstrim mm, /proc/pid/pagemap: fix soft dirty marking for PMD migration entry userfaultfd: hugetlbfs: prevent UFFDIO_COPY to fill beyond the end of i_size
Diffstat (limited to 'fs/hugetlbfs/inode.c')
-rw-r--r--fs/hugetlbfs/inode.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/fs/hugetlbfs/inode.c b/fs/hugetlbfs/inode.c
index 59073e9f01a4..ed113ea17aff 100644
--- a/fs/hugetlbfs/inode.c
+++ b/fs/hugetlbfs/inode.c
@@ -842,9 +842,12 @@ static int hugetlbfs_error_remove_page(struct address_space *mapping,
842 struct page *page) 842 struct page *page)
843{ 843{
844 struct inode *inode = mapping->host; 844 struct inode *inode = mapping->host;
845 pgoff_t index = page->index;
845 846
846 remove_huge_page(page); 847 remove_huge_page(page);
847 hugetlb_fix_reserve_counts(inode); 848 if (unlikely(hugetlb_unreserve_pages(inode, index, index + 1, 1)))
849 hugetlb_fix_reserve_counts(inode);
850
848 return 0; 851 return 0;
849} 852}
850 853