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>
This commit is contained in:

committed by
Linus Torvalds

parent
63f53dea0c
commit
72e2936c04
@@ -567,13 +567,13 @@ retry:
|
||||
* appear as a "reserved" entry instead of simply dangling with incorrect
|
||||
* counts.
|
||||
*/
|
||||
void hugetlb_fix_reserve_counts(struct inode *inode, bool restore_reserve)
|
||||
void hugetlb_fix_reserve_counts(struct inode *inode)
|
||||
{
|
||||
struct hugepage_subpool *spool = subpool_inode(inode);
|
||||
long rsv_adjust;
|
||||
|
||||
rsv_adjust = hugepage_subpool_get_pages(spool, 1);
|
||||
if (restore_reserve && rsv_adjust) {
|
||||
if (rsv_adjust) {
|
||||
struct hstate *h = hstate_inode(inode);
|
||||
|
||||
hugetlb_acct_memory(h, 1);
|
||||
|
Reference in New Issue
Block a user