Function report

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

Source Code:fs\open.c Create Date:2022-07-28 20:00:51
Last Modify:2020-03-18 10:16:03 Copyright©Brick
home page Tree
Annotation kernel can get tool activityDownload SCCTChinese

Name:do_sys_truncate

Proto:long do_sys_truncate(const char __user *pathname, loff_t length)

Type:long

Parameter:

TypeParameterName
const char __user *pathname
loff_tlength
123  lookup_flags = llow links at the end
127  If length < 0 Then Return -EINVAL
130  retry :
131  error = user_path_at(Special value used to indicateopenat should use the currentworking directory. , pathname, lookup_flags, & path)
132  If Not error Then
133  error = vfs_truncate( & path, length)
134  path_put( & path)
136  If 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 Then
137  lookup_flags |= ll ->d_revalidate() to trust no cache
138  Go to retry
140  Return error
Caller
NameDescribe
SYSCALL_DEFINE2
COMPAT_SYSCALL_DEFINE2
SYSCALL_DEFINE2LFS versions of truncate are only needed on 32 bit machines