函数逻辑报告

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

Source Code:fs\open.c Create Date:2022-07-29 10:30:55
Last Modify:2020-03-18 10:16:03 Copyright©Brick
首页 函数Tree
注解内核,赢得工具下载SCCTEnglish

函数名称:do_sys_truncate

函数原型:long do_sys_truncate(const char __user *pathname, loff_t length)

返回类型:long

参数:

类型参数名称
const char __user *pathname
loff_tlength
123  lookup_flags等于llow links at the end
127  如果length小于0则返回:负EINVAL
130  retry :
131  error等于user_path_at(Special value used to indicateopenat should use the currentworking directory. , pathname, lookup_flags, & path)
132  如果非error
133  error等于vfs_truncate( & path, length)
134  path_put( & path)
136  如果ry_estale - determine whether the caller should retry an operation*@error: the error that would currently be returned*@flags: flags being used for next lookup attempt* Check to see if the error code was -ESTALE, and then determine whether
137  lookup_flags或等于ll ->d_revalidate() to trust no cache
138  转到:retry
140  返回:error
调用者
名称描述
SYSCALL_DEFINE2
COMPAT_SYSCALL_DEFINE2
SYSCALL_DEFINE2LFS versions of truncate are only needed on 32 bit machines