Function report

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

Source Code:mm\madvise.c Create Date:2022-07-28 15:12:41
Last Modify:2020-03-12 14:18:49 Copyright©Brick
home page Tree
Annotation kernel can get tool activityDownload SCCTChinese

Name:Application wants to free up the pages and associated backing store.* This is effectively punching a hole into the middle of a file.

Proto:static long madvise_remove(struct vm_area_struct *vma, struct vm_area_struct **prev, unsigned long start, unsigned long end)

Type:long

Parameter:

TypeParameterName
struct vm_area_struct *vma
struct vm_area_struct **prev
unsigned longstart
unsigned longend
822  * prev = NULL
824  If Flags, see mm.h. & VM_LOCKED Then Return -EINVAL
827  f = File we map to (can be NULL).
829  If Not f || Not f_mapping || Not host Then
830  Return -EINVAL
833  If (Flags, see mm.h. & (VM_SHARED | VM_WRITE)) != (VM_SHARED | VM_WRITE) Then Return -EACCES
836  offset = start - Our start address within vm_mm. + (Offset (within vm_file) in PAGE_SIZEunits << PAGE_SHIFT determines the page size )
845  get_file(f)
846  If userfaultfd_remove(vma, start, end) Then
848  lease a read lock
850  error = vfs_fallocate(f, de-allocates range | default is extend size , offset, end - start)
853  fput(f)
854  lock for reading
855  Return error
Caller
NameDescribe
madvise_vma