Function report

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

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

Name:MS_SYNC syncs the entire file - including mappings

Proto:SYSCALL_DEFINE3(msync, unsigned long, start, size_t, len, int, flags)

Type:

Parameter:Nothing

35  mm = mm
37  unmapped_error = 0
38  error = -EINVAL
40  start = Architectures that support memory tagging (assigning tags to memory regions,* embedding these tags into addresses that point to these memory regions, and* checking that the memory and the pointer tags match on memory accesses)(start)
42  If flags & ~( sync memory asynchronously | validate the caches | synchronous memory sync ) Then Go to out
44  If offset_in_page(start) Then Go to out
46  If flags & sync memory asynchronously && flags & synchronous memory sync Then Go to out
48  error = -ENOMEM
49  len = len + ~PAGE_MASK & PAGE_MASK
50  end = start + len
51  If end < start Then Go to out
53  error = 0
54  If end == start Then Go to out
60  lock for reading
61  vma = Look up the first VMA which satisfies addr < vm_end, NULL if none.
62  cycle
67  error = -ENOMEM
68  If Not vma Then Go to out_unlock
73  If start >= end Then Go to out_unlock
80  error = -EBUSY
81  Go to out_unlock
83  file = File we map to (can be NULL).
84  fstart = start - Our start address within vm_mm. + (Offset (within vm_file) in PAGE_SIZEunits << PAGE_SHIFT determines the page size )
86  fend = fstart + min - return minimum of two values of the same or compatible types*@x: first value*@y: second value(end, The first byte after our end addresswithin vm_mm. ) - start - 1
87  start = The first byte after our end addresswithin vm_mm.
90  get_file(file)
93  fput(file)
94  If error || start >= end Then Go to out
98  Else
99  If start >= end Then
100  error = 0
101  Go to out_unlock
106  out_unlock :
107  lease a read lock
108  out :
109  Return If error Else unmapped_error