]> pilppa.org Git - linux-2.6-omap-h63xx.git/blobdiff - ipc/shm.c
shm: fix shmctl(SHM_INFO) lockup with !CONFIG_SHMEM
[linux-2.6-omap-h63xx.git] / ipc / shm.c
index c0a021f7f41a8ff80118a5b0f76516444a561bd2..f8f69fad3a27879e1f0bf82725c196455dec81c8 100644 (file)
--- 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++;