Function report

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

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

Name:vfs_statx - Get basic and extra attributes by filename*@dfd: A file descriptor representing the base dir for a relative filename*@filename: The name of the file of interest*@flags: Flags to control the query*@stat: The result structure to fill in

Proto:int vfs_statx(int dfd, const char __user *filename, int flags, struct kstat *stat, unsigned int request_mask)

Type:int

Parameter:

TypeParameterName
intdfd
const char __user *filename
intflags
struct kstat *stat
unsigned intrequest_mask
172  error = -EINVAL
173  lookup_flags = llow links at the end | rce terminal automount
175  If (flags & ~( Do not follow symbolic links. | Suppress terminal automount traversal | Allow empty relative pathname | KSTAT_QUERY_FLAGS)) != 0 Then Return -EINVAL
179  If flags & Do not follow symbolic links. Then lookup_flags &= ~llow links at the end
181  If flags & Suppress terminal automount traversal Then lookup_flags &= ~rce terminal automount
183  If flags & Allow empty relative pathname Then lookup_flags |= accept empty path [user_... only]
186  retry :
187  error = user_path_at(dfd, filename, lookup_flags, & path)
188  If error Then Go to out
191  error = vfs_getattr - Get the enhanced basic attributes of a file*@path: The file of interest*@stat: Where to return the statistics*@request_mask: STATX_xxx flags indicating what the caller wants*@query_flags: Query mode (KSTAT_QUERY_FLAGS)
192  path_put( & path)
193  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
194  lookup_flags |= ll ->d_revalidate() to trust no cache
195  Go to retry
197  out :
198  Return error
Caller
NameDescribe
SYSCALL_DEFINE5sys_statx - System call to get enhanced stats*@dfd: Base directory to pathwalk from *or* fd to stat.*@filename: File to stat or "" with AT_EMPTY_PATH*@flags: AT_* flags to control pathwalk.*@mask: Parts of statx struct actually required.