diff options
author | zhong jiang <zhongjiang@huawei.com> | 2016-10-07 20:02:01 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2016-10-07 21:46:29 -0400 |
commit | 72e2936c04f7d2a4bf87d7f72d3bf11cf91ebb47 (patch) | |
tree | e074463b15c0c725afca88f16a5683ae437e0459 /mm | |
parent | 63f53dea0c9866e93802d50a230c460a024c44e5 (diff) |
mm: remove unnecessary condition in remove_inode_hugepages
When the huge page is added to the page cahce (huge_add_to_page_cache),
the page private flag will be cleared. since this code
(remove_inode_hugepages) will only be called for pages in the page
cahce, PagePrivate(page) will always be false.
The patch remove the code without any functional change.
Link: http://lkml.kernel.org/r/1475113323-29368-1-git-send-email-zhongjiang@huawei.com
Signed-off-by: zhong jiang <zhongjiang@huawei.com>
Reviewed-by: Naoya Horiguchi <n-horiguchi@ah.jp.nec.com>
Reviewed-by: Mike Kravetz <mike.kravetz@oracle.com>
Tested-by: Mike Kravetz <mike.kravetz@oracle.com>
Acked-by: Michal Hocko <mhocko@suse.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'mm')
-rw-r--r-- | mm/hugetlb.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/mm/hugetlb.c b/mm/hugetlb.c index e4a4500758f2..ec49d9ef1eef 100644 --- a/mm/hugetlb.c +++ b/mm/hugetlb.c | |||
@@ -567,13 +567,13 @@ retry: | |||
567 | * appear as a "reserved" entry instead of simply dangling with incorrect | 567 | * appear as a "reserved" entry instead of simply dangling with incorrect |
568 | * counts. | 568 | * counts. |
569 | */ | 569 | */ |
570 | void hugetlb_fix_reserve_counts(struct inode *inode, bool restore_reserve) | 570 | void hugetlb_fix_reserve_counts(struct inode *inode) |
571 | { | 571 | { |
572 | struct hugepage_subpool *spool = subpool_inode(inode); | 572 | struct hugepage_subpool *spool = subpool_inode(inode); |
573 | long rsv_adjust; | 573 | long rsv_adjust; |
574 | 574 | ||
575 | rsv_adjust = hugepage_subpool_get_pages(spool, 1); | 575 | rsv_adjust = hugepage_subpool_get_pages(spool, 1); |
576 | if (restore_reserve && rsv_adjust) { | 576 | if (rsv_adjust) { |
577 | struct hstate *h = hstate_inode(inode); | 577 | struct hstate *h = hstate_inode(inode); |
578 | 578 | ||
579 | hugetlb_acct_memory(h, 1); | 579 | hugetlb_acct_memory(h, 1); |