Commit 41836382ebb415d68d3ebc4525e78e871fe58baf

Authored by David Howells
1 parent 9c93af1ede

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>

Showing 1 changed file with 1 additions and 27 deletions Side-by-side Diff

... ... @@ -40,7 +40,6 @@
40 40 struct page *mem_map;
41 41 unsigned long max_mapnr;
42 42 unsigned long num_physpages;
43   -unsigned long askedalloc, realalloc;
44 43 atomic_long_t vm_committed_space = ATOMIC_LONG_INIT(0);
45 44 int sysctl_overcommit_memory = OVERCOMMIT_GUESS; /* heuristic overcommit */
46 45 int sysctl_overcommit_ratio = 50; /* default is 50% */
47 46  
... ... @@ -1042,22 +1041,11 @@
1042 1041 /* okay... we have a mapping; now we have to register it */
1043 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 1044 current->mm->total_vm += len >> PAGE_SHIFT;
1054 1045  
1055 1046 add_nommu_vma(vma);
1056 1047  
1057 1048 shared:
1058   - realalloc += kobjsize(vml);
1059   - askedalloc += sizeof(*vml);
1060   -
1061 1049 add_vma_to_mm(current->mm, vml);
1062 1050  
1063 1051 up_write(&nommu_vma_sem);
1064 1052  
1065 1053  
... ... @@ -1124,15 +1112,9 @@
1124 1112  
1125 1113 /* IO memory and memory shared directly out of the pagecache from
1126 1114 * ramfs/tmpfs mustn't be released here */
1127   - if (vma->vm_flags & VM_MAPPED_COPY) {
1128   - realalloc -= kobjsize((void *) vma->vm_start);
1129   - askedalloc -= vma->vm_end - vma->vm_start;
  1115 + if (vma->vm_flags & VM_MAPPED_COPY)
1130 1116 kfree((void *) vma->vm_start);
1131   - }
1132 1117  
1133   - realalloc -= kobjsize(vma);
1134   - askedalloc -= sizeof(*vma);
1135   -
1136 1118 if (vma->vm_file) {
1137 1119 fput(vma->vm_file);
1138 1120 if (vma->vm_flags & VM_EXECUTABLE)
... ... @@ -1177,8 +1159,6 @@
1177 1159 put_vma(mm, vml->vma);
1178 1160  
1179 1161 *parent = vml->next;
1180   - realalloc -= kobjsize(vml);
1181   - askedalloc -= sizeof(*vml);
1182 1162 kfree(vml);
1183 1163  
1184 1164 update_hiwater_vm(mm);
... ... @@ -1220,9 +1200,6 @@
1220 1200 while ((tmp = mm->context.vmlist)) {
1221 1201 mm->context.vmlist = tmp->next;
1222 1202 put_vma(mm, tmp->vma);
1223   -
1224   - realalloc -= kobjsize(tmp);
1225   - askedalloc -= sizeof(*tmp);
1226 1203 kfree(tmp);
1227 1204 }
1228 1205  
... ... @@ -1275,9 +1252,6 @@
1275 1252  
1276 1253 /* all checks complete - do it */
1277 1254 vma->vm_end = vma->vm_start + new_len;
1278   -
1279   - askedalloc -= old_len;
1280   - askedalloc += new_len;
1281 1255  
1282 1256 return vma->vm_start;
1283 1257 }