]> pilppa.org Git - linux-2.6-omap-h63xx.git/blobdiff - ipc/shm.c
virtio: Recycle unused recv buffer pages for large skbs in net driver
[linux-2.6-omap-h63xx.git] / ipc / shm.c
index 790240cd067f60860957951db601dfb2fc81e373..a726aebce7d7f9c679f468343aaf62a4354d805c 100644 (file)
--- a/ipc/shm.c
+++ b/ipc/shm.c
@@ -577,7 +577,8 @@ static void shm_get_stat(struct ipc_namespace *ns, unsigned long *rss,
 
                if (is_file_hugepages(shp->shm_file)) {
                        struct address_space *mapping = inode->i_mapping;
-                       *rss += (HPAGE_SIZE/PAGE_SIZE)*mapping->nrpages;
+                       struct hstate *h = hstate_file(shp->shm_file);
+                       *rss += pages_per_huge_page(h) * mapping->nrpages;
                } else {
                        struct shmem_inode_info *info = SHMEM_I(inode);
                        spin_lock(&info->lock);