aboutsummaryrefslogtreecommitdiffstats
path: root/ipc/shm.c
diff options
context:
space:
mode:
Diffstat (limited to 'ipc/shm.c')
-rw-r--r--ipc/shm.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/ipc/shm.c b/ipc/shm.c
index 790240cd067f..a726aebce7d7 100644
--- a/ipc/shm.c
+++ b/ipc/shm.c
@@ -577,7 +577,8 @@ static void shm_get_stat(struct ipc_namespace *ns, unsigned long *rss,
577 577
578 if (is_file_hugepages(shp->shm_file)) { 578 if (is_file_hugepages(shp->shm_file)) {
579 struct address_space *mapping = inode->i_mapping; 579 struct address_space *mapping = inode->i_mapping;
580 *rss += (HPAGE_SIZE/PAGE_SIZE)*mapping->nrpages; 580 struct hstate *h = hstate_file(shp->shm_file);
581 *rss += pages_per_huge_page(h) * mapping->nrpages;
581 } else { 582 } else {
582 struct shmem_inode_info *info = SHMEM_I(inode); 583 struct shmem_inode_info *info = SHMEM_I(inode);
583 spin_lock(&info->lock); 584 spin_lock(&info->lock);