diff options
-rw-r--r-- | ipc/shm.c | 4 |
1 files changed, 4 insertions, 0 deletions
@@ -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++; |