Fixed an msync() issue.

msync used find_vma_byrange() instead of traversing each vma. Fixed now.
This commit is contained in:
Bahadir Balban
2008-11-07 15:10:19 +02:00
parent 3cb36b632a
commit f0348cc356
2 changed files with 17 additions and 3 deletions

View File

@@ -183,6 +183,7 @@ struct vm_area {
unsigned long file_offset; /* File offset in pfns */
};
/* Finds 'a' vma that is in this range. Only useful for munmap() */
static inline struct vm_area *
find_vma_byrange(unsigned long pfn_start,
unsigned long pfn_end, struct list_head *vm_area_list)
@@ -199,6 +200,11 @@ find_vma_byrange(unsigned long pfn_start,
}
/*
* Finds the vma that has the given address.
* TODO: In the future a lot of use cases may need to traverse each vma
* rather than searching the address. E.g. munmap/msync
*/
static inline struct vm_area *find_vma(unsigned long addr,
struct list_head *vm_area_list)
{