函数逻辑报告

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

Source Code:fs\namei.c Create Date:2022-07-29 10:35:02
Last Modify:2020-03-12 14:18:49 Copyright©Brick
首页 函数Tree
注解内核,赢得工具下载SCCTEnglish

函数名称:handle_truncate

函数原型:static int handle_truncate(struct file *filp)

返回类型:int

参数:

类型参数名称
struct file *filp
2940  path等于f_path
2941  inode等于 Where the name belongs to - NULL is * negative
2942  error等于get_write_access() gets write permission for a file.* put_write_access() releases this write permission.* This is used for regular files.* We cannot support write (and maybe mmap read-write shared) accesses and* MAP_DENYWRITE mmappings simultaneously
2943  如果error则返回:error
2948  error等于locks_verify_locked(filp)
2949  如果非errorerror等于security_path_truncate(path)
2951  如果非error
2952  error等于do_truncate(dentry, 0, ATTR_MTIME | ATTR_CTIME | Truncating from open(O_TRUNC) , filp)
2956  put_write_access(inode)
2957  返回:error
调用者
名称描述
do_lastHandle the last step of open()