linuxkpi: Introduce vma_set_file()
This code was moved from the i915 driver in Linux 5.11. Reviewed by: manu Approved by: manu Differential Revision: https://reviews.freebsd.org/D36957
This commit is contained in:
parent
415ca4d27d
commit
c72dd0aabe
@ -311,4 +311,6 @@ void lkpi_unmap_mapping_range(void *obj, loff_t const holebegin __unused,
|
||||
|
||||
#define PAGE_ALIGNED(p) __is_aligned(p, PAGE_SIZE)
|
||||
|
||||
void vma_set_file(struct vm_area_struct *vma, struct linux_file *file);
|
||||
|
||||
#endif /* _LINUXKPI_LINUX_MM_H_ */
|
||||
|
@ -834,6 +834,18 @@ zap_vma_ptes(struct vm_area_struct *vma, unsigned long address,
|
||||
return (0);
|
||||
}
|
||||
|
||||
void
|
||||
vma_set_file(struct vm_area_struct *vma, struct linux_file *file)
|
||||
{
|
||||
struct linux_file *tmp;
|
||||
|
||||
/* Changing an anonymous vma with this is illegal */
|
||||
get_file(file);
|
||||
tmp = vma->vm_file;
|
||||
vma->vm_file = file;
|
||||
fput(tmp);
|
||||
}
|
||||
|
||||
static struct file_operations dummy_ldev_ops = {
|
||||
/* XXXKIB */
|
||||
};
|
||||
|
Loading…
Reference in New Issue
Block a user