ashmem: account for older kernel which don't have vma_set_anonymous
Was first introduced in 4.18 and needs to be called from ashmem when running with a kernel >= 4.18.
This commit is contained in:
parent
0391d4fe2f
commit
0e31fc5ec5
|
@ -419,9 +419,13 @@ static int ashmem_mmap(struct file *file, struct vm_area_struct *vma)
|
||||||
fput(asma->file);
|
fput(asma->file);
|
||||||
goto out;
|
goto out;
|
||||||
}
|
}
|
||||||
|
#if LINUX_VERSION_CODE >= KERNEL_VERSION(4, 18, 0)
|
||||||
} else {
|
} else {
|
||||||
vma_set_anonymous(vma);
|
vma_set_anonymous(vma);
|
||||||
}
|
}
|
||||||
|
#else
|
||||||
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
if (vma->vm_file)
|
if (vma->vm_file)
|
||||||
fput(vma->vm_file);
|
fput(vma->vm_file);
|
||||||
|
|
Loading…
Reference in New Issue