diff options
Diffstat (limited to 'ipc')
-rw-r--r-- | ipc/shm.c | 4 |
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, struct hstate *h = hstate_file(shp->shm_file); *rss += pages_per_huge_page(h) * mapping->nrpages; } else { +#ifdef CONFIG_SHMEM struct shmem_inode_info *info = SHMEM_I(inode); spin_lock(&info->lock); *rss += inode->i_mapping->nrpages; *swp += info->swapped; spin_unlock(&info->lock); +#else + *rss += inode->i_mapping->nrpages; +#endif } total++; |