diff options
author | Ingo Molnar <mingo@elte.hu> | 2009-02-06 14:42:54 +0100 |
---|---|---|
committer | Ingo Molnar <mingo@elte.hu> | 2009-02-06 14:42:54 +0100 |
commit | 0464ac9ebd90cfd5792d3c1158af848281b7eb09 (patch) | |
tree | ab4419845b9e7ae3417741f34cfab6acd00754aa /ipc/shm.c | |
parent | 0973a06cde8cc1522fbcf2baacb926f1ee3f4c79 (diff) | |
parent | 9be260a646bf76fa418ee519afa10196b3164681 (diff) | |
download | talos-op-linux-0464ac9ebd90cfd5792d3c1158af848281b7eb09.tar.gz talos-op-linux-0464ac9ebd90cfd5792d3c1158af848281b7eb09.zip |
Merge branch 'linus' into x86/mm
Conflicts:
arch/x86/mm/fault.c
Diffstat (limited to 'ipc/shm.c')
-rw-r--r-- | ipc/shm.c | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/ipc/shm.c b/ipc/shm.c index a9e09ad2263e..f8f69fad3a27 100644 --- a/ipc/shm.c +++ b/ipc/shm.c @@ -368,14 +368,14 @@ static int newseg(struct ipc_namespace *ns, struct ipc_params *params) file = hugetlb_file_setup(name, size); shp->mlock_user = current_user(); } else { - int acctflag = VM_ACCOUNT; + int acctflag = 0; /* * Do not allow no accounting for OVERCOMMIT_NEVER, even * if it's asked for. */ if ((shmflg & SHM_NORESERVE) && sysctl_overcommit_memory != OVERCOMMIT_NEVER) - acctflag = 0; + acctflag = VM_NORESERVE; file = shmem_file_setup(name, size, acctflag); } error = PTR_ERR(file); @@ -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++; |