Function report

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

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

Name:handle_truncate

Proto:static int handle_truncate(struct file *filp)

Type:int

Parameter:

TypeParameterName
struct file *filp
2940  path = f_path
2941  inode = Where the name belongs to - NULL is * negative
2942  error = gets write permission for a file
2943  If error Then Return error
2948  error = locks_verify_locked(filp)
2949  If Not error Then error = security_path_truncate(path)
2951  If Not error Then
2952  error = do_truncate(dentry, 0, ATTR_MTIME | ATTR_CTIME | Truncating from open(O_TRUNC) , filp)
2956  releases this write permission
2957  Return error
Caller
NameDescribe
do_lastHandle the last step of open()