Function report

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

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

Name:file_mmap_ok

Proto:static inline bool file_mmap_ok(struct file *file, struct inode *inode, unsigned long pgoff, unsigned long len)

Type:bool

Parameter:

TypeParameterName
struct file *file
struct inode *inode
unsigned longpgoff
unsigned longlen
1354  maxsize = file_mmap_size_max(file, inode)
1356  If maxsize && len > maxsize Then Return false
1358  maxsize -= len
1359  If pgoff > maxsize >> PAGE_SHIFT determines the page size Then Return false
1361  Return true
Caller
NameDescribe
do_mmapThe caller must hold down_write(¤t->mm->mmap_sem).