projects
/
cascardo
/
linux.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
mm, swap: use offset of swap entry as key of swap cache
[cascardo/linux.git]
/
mm
/
vmacache.c
diff --git
a/mm/vmacache.c
b/mm/vmacache.c
index
fd09dc9
..
035fdeb
100644
(file)
--- a/
mm/vmacache.c
+++ b/
mm/vmacache.c
@@
-87,11
+87,11
@@
struct vm_area_struct *vmacache_find(struct mm_struct *mm, unsigned long addr)
{
int i;
{
int i;
+ count_vm_vmacache_event(VMACACHE_FIND_CALLS);
+
if (!vmacache_valid(mm))
return NULL;
if (!vmacache_valid(mm))
return NULL;
- count_vm_vmacache_event(VMACACHE_FIND_CALLS);
-
for (i = 0; i < VMACACHE_SIZE; i++) {
struct vm_area_struct *vma = current->vmacache[i];
for (i = 0; i < VMACACHE_SIZE; i++) {
struct vm_area_struct *vma = current->vmacache[i];
@@
-115,11
+115,11
@@
struct vm_area_struct *vmacache_find_exact(struct mm_struct *mm,
{
int i;
{
int i;
+ count_vm_vmacache_event(VMACACHE_FIND_CALLS);
+
if (!vmacache_valid(mm))
return NULL;
if (!vmacache_valid(mm))
return NULL;
- count_vm_vmacache_event(VMACACHE_FIND_CALLS);
-
for (i = 0; i < VMACACHE_SIZE; i++) {
struct vm_area_struct *vma = current->vmacache[i];
for (i = 0; i < VMACACHE_SIZE; i++) {
struct vm_area_struct *vma = current->vmacache[i];