diff options
author | David Howells <dhowells@redhat.com> | 2009-01-08 07:04:47 -0500 |
---|---|---|
committer | David Howells <dhowells@redhat.com> | 2009-01-08 07:04:47 -0500 |
commit | 41836382ebb415d68d3ebc4525e78e871fe58baf (patch) | |
tree | 05e0dab9662420bd157f8805083a729e433dd869 /mm | |
parent | 9c93af1ede9418bb3f1b9dd442faf91ba796a0ff (diff) |
NOMMU: Delete askedalloc and realalloc variables
Delete the askedalloc and realalloc variables as nothing actually uses the
value calculated.
Signed-off-by: David Howells <dhowells@redhat.com>
Tested-by: Mike Frysinger <vapier.adi@gmail.com>
Acked-by: Paul Mundt <lethal@linux-sh.org>
Diffstat (limited to 'mm')
-rw-r--r-- | mm/nommu.c | 28 |
1 files changed, 1 insertions, 27 deletions
diff --git a/mm/nommu.c b/mm/nommu.c index 1c28ea3a4e9c..23f355bbe262 100644 --- a/mm/nommu.c +++ b/mm/nommu.c | |||
@@ -40,7 +40,6 @@ void *high_memory; | |||
40 | struct page *mem_map; | 40 | struct page *mem_map; |
41 | unsigned long max_mapnr; | 41 | unsigned long max_mapnr; |
42 | unsigned long num_physpages; | 42 | unsigned long num_physpages; |
43 | unsigned long askedalloc, realalloc; | ||
44 | atomic_long_t vm_committed_space = ATOMIC_LONG_INIT(0); | 43 | atomic_long_t vm_committed_space = ATOMIC_LONG_INIT(0); |
45 | int sysctl_overcommit_memory = OVERCOMMIT_GUESS; /* heuristic overcommit */ | 44 | int sysctl_overcommit_memory = OVERCOMMIT_GUESS; /* heuristic overcommit */ |
46 | int sysctl_overcommit_ratio = 50; /* default is 50% */ | 45 | int sysctl_overcommit_ratio = 50; /* default is 50% */ |
@@ -1042,22 +1041,11 @@ unsigned long do_mmap_pgoff(struct file *file, | |||
1042 | /* okay... we have a mapping; now we have to register it */ | 1041 | /* okay... we have a mapping; now we have to register it */ |
1043 | result = (void *) vma->vm_start; | 1042 | result = (void *) vma->vm_start; |
1044 | 1043 | ||
1045 | if (vma->vm_flags & VM_MAPPED_COPY) { | ||
1046 | realalloc += kobjsize(result); | ||
1047 | askedalloc += len; | ||
1048 | } | ||
1049 | |||
1050 | realalloc += kobjsize(vma); | ||
1051 | askedalloc += sizeof(*vma); | ||
1052 | |||
1053 | current->mm->total_vm += len >> PAGE_SHIFT; | 1044 | current->mm->total_vm += len >> PAGE_SHIFT; |
1054 | 1045 | ||
1055 | add_nommu_vma(vma); | 1046 | add_nommu_vma(vma); |
1056 | 1047 | ||
1057 | shared: | 1048 | shared: |
1058 | realalloc += kobjsize(vml); | ||
1059 | askedalloc += sizeof(*vml); | ||
1060 | |||
1061 | add_vma_to_mm(current->mm, vml); | 1049 | add_vma_to_mm(current->mm, vml); |
1062 | 1050 | ||
1063 | up_write(&nommu_vma_sem); | 1051 | up_write(&nommu_vma_sem); |
@@ -1124,14 +1112,8 @@ static void put_vma(struct mm_struct *mm, struct vm_area_struct *vma) | |||
1124 | 1112 | ||
1125 | /* IO memory and memory shared directly out of the pagecache from | 1113 | /* IO memory and memory shared directly out of the pagecache from |
1126 | * ramfs/tmpfs mustn't be released here */ | 1114 | * ramfs/tmpfs mustn't be released here */ |
1127 | if (vma->vm_flags & VM_MAPPED_COPY) { | 1115 | if (vma->vm_flags & VM_MAPPED_COPY) |
1128 | realalloc -= kobjsize((void *) vma->vm_start); | ||
1129 | askedalloc -= vma->vm_end - vma->vm_start; | ||
1130 | kfree((void *) vma->vm_start); | 1116 | kfree((void *) vma->vm_start); |
1131 | } | ||
1132 | |||
1133 | realalloc -= kobjsize(vma); | ||
1134 | askedalloc -= sizeof(*vma); | ||
1135 | 1117 | ||
1136 | if (vma->vm_file) { | 1118 | if (vma->vm_file) { |
1137 | fput(vma->vm_file); | 1119 | fput(vma->vm_file); |
@@ -1177,8 +1159,6 @@ int do_munmap(struct mm_struct *mm, unsigned long addr, size_t len) | |||
1177 | put_vma(mm, vml->vma); | 1159 | put_vma(mm, vml->vma); |
1178 | 1160 | ||
1179 | *parent = vml->next; | 1161 | *parent = vml->next; |
1180 | realalloc -= kobjsize(vml); | ||
1181 | askedalloc -= sizeof(*vml); | ||
1182 | kfree(vml); | 1162 | kfree(vml); |
1183 | 1163 | ||
1184 | update_hiwater_vm(mm); | 1164 | update_hiwater_vm(mm); |
@@ -1220,9 +1200,6 @@ void exit_mmap(struct mm_struct * mm) | |||
1220 | while ((tmp = mm->context.vmlist)) { | 1200 | while ((tmp = mm->context.vmlist)) { |
1221 | mm->context.vmlist = tmp->next; | 1201 | mm->context.vmlist = tmp->next; |
1222 | put_vma(mm, tmp->vma); | 1202 | put_vma(mm, tmp->vma); |
1223 | |||
1224 | realalloc -= kobjsize(tmp); | ||
1225 | askedalloc -= sizeof(*tmp); | ||
1226 | kfree(tmp); | 1203 | kfree(tmp); |
1227 | } | 1204 | } |
1228 | 1205 | ||
@@ -1276,9 +1253,6 @@ unsigned long do_mremap(unsigned long addr, | |||
1276 | /* all checks complete - do it */ | 1253 | /* all checks complete - do it */ |
1277 | vma->vm_end = vma->vm_start + new_len; | 1254 | vma->vm_end = vma->vm_start + new_len; |
1278 | 1255 | ||
1279 | askedalloc -= old_len; | ||
1280 | askedalloc += new_len; | ||
1281 | |||
1282 | return vma->vm_start; | 1256 | return vma->vm_start; |
1283 | } | 1257 | } |
1284 | EXPORT_SYMBOL(do_mremap); | 1258 | EXPORT_SYMBOL(do_mremap); |