aboutsummaryrefslogtreecommitdiffstats
path: root/ipc
diff options
context:
space:
mode:
Diffstat (limited to 'ipc')
-rw-r--r--ipc/shm.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/ipc/shm.c b/ipc/shm.c
index c0a021f7f41a..f8f69fad3a27 100644
--- a/ipc/shm.c
+++ b/ipc/shm.c
@@ -565,11 +565,15 @@ static void shm_get_stat(struct ipc_namespace *ns, unsigned long *rss,
565 struct hstate *h = hstate_file(shp->shm_file); 565 struct hstate *h = hstate_file(shp->shm_file);
566 *rss += pages_per_huge_page(h) * mapping->nrpages; 566 *rss += pages_per_huge_page(h) * mapping->nrpages;
567 } else { 567 } else {
568#ifdef CONFIG_SHMEM
568 struct shmem_inode_info *info = SHMEM_I(inode); 569 struct shmem_inode_info *info = SHMEM_I(inode);
569 spin_lock(&info->lock); 570 spin_lock(&info->lock);
570 *rss += inode->i_mapping->nrpages; 571 *rss += inode->i_mapping->nrpages;
571 *swp += info->swapped; 572 *swp += info->swapped;
572 spin_unlock(&info->lock); 573 spin_unlock(&info->lock);
574#else
575 *rss += inode->i_mapping->nrpages;
576#endif
573 } 577 }
574 578
575 total++; 579 total++;