Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

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>

+1 -27
+1 -27
mm/nommu.c
··· 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% */ ··· 1041 1042 /* okay... we have a mapping; now we have to register it */ 1042 1043 result = (void *) vma->vm_start; 1043 1044 1044 - if (vma->vm_flags & VM_MAPPED_COPY) { 1045 - realalloc += kobjsize(result); 1046 - askedalloc += len; 1047 - } 1048 - 1049 - realalloc += kobjsize(vma); 1050 - askedalloc += sizeof(*vma); 1051 - 1052 1045 current->mm->total_vm += len >> PAGE_SHIFT; 1053 1046 1054 1047 add_nommu_vma(vma); 1055 1048 1056 1049 shared: 1057 - realalloc += kobjsize(vml); 1058 - askedalloc += sizeof(*vml); 1059 - 1060 1050 add_vma_to_mm(current->mm, vml); 1061 1051 1062 1052 up_write(&nommu_vma_sem); ··· 1112 1124 1113 1125 /* IO memory and memory shared directly out of the pagecache from 1114 1126 * ramfs/tmpfs mustn't be released here */ 1115 - if (vma->vm_flags & VM_MAPPED_COPY) { 1116 - realalloc -= kobjsize((void *) vma->vm_start); 1117 - askedalloc -= vma->vm_end - vma->vm_start; 1127 + if (vma->vm_flags & VM_MAPPED_COPY) 1118 1128 kfree((void *) vma->vm_start); 1119 - } 1120 - 1121 - realalloc -= kobjsize(vma); 1122 - askedalloc -= sizeof(*vma); 1123 1129 1124 1130 if (vma->vm_file) { 1125 1131 fput(vma->vm_file); ··· 1159 1177 put_vma(mm, vml->vma); 1160 1178 1161 1179 *parent = vml->next; 1162 - realalloc -= kobjsize(vml); 1163 - askedalloc -= sizeof(*vml); 1164 1180 kfree(vml); 1165 1181 1166 1182 update_hiwater_vm(mm); ··· 1200 1220 while ((tmp = mm->context.vmlist)) { 1201 1221 mm->context.vmlist = tmp->next; 1202 1222 put_vma(mm, tmp->vma); 1203 - 1204 - realalloc -= kobjsize(tmp); 1205 - askedalloc -= sizeof(*tmp); 1206 1223 kfree(tmp); 1207 1224 } 1208 1225 ··· 1252 1275 1253 1276 /* all checks complete - do it */ 1254 1277 vma->vm_end = vma->vm_start + new_len; 1255 - 1256 - askedalloc -= old_len; 1257 - askedalloc += new_len; 1258 1278 1259 1279 return vma->vm_start; 1260 1280 }