mirror of
https://github.com/drasko/codezero.git
synced 2026-02-12 09:53:16 +01:00
Removed find_vma_byrange completely. It was buggy and useless.
This commit is contained in:
@@ -183,23 +183,8 @@ 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)
|
||||
{
|
||||
struct vm_area *vma;
|
||||
|
||||
list_for_each_entry(vma, vm_area_list, list) {
|
||||
if ((pfn_start >= vma->pfn_start) && (pfn_start < vma->pfn_end))
|
||||
return vma;
|
||||
if ((pfn_end >= vma->pfn_start) && (pfn_end < vma->pfn_end))
|
||||
return vma;
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
||||
int vma_intersect(unsigned long pfn_start, unsigned long pfn_end,
|
||||
struct vm_area *vma);
|
||||
/*
|
||||
* Finds the vma that has the given address.
|
||||
* TODO: In the future a lot of use cases may need to traverse each vma
|
||||
|
||||
Reference in New Issue
Block a user