Function report

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

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

Name:__fget

Proto:static struct file *__fget(unsigned int fd, fmode_t mask, unsigned int refs)

Type:struct file

Parameter:

TypeParameterName
unsigned intfd
fmode_tmask
unsigned intrefs
711  files = files
714  _read_lock() - mark the beginning of an RCU read-side critical section* When synchronize_rcu() is invoked on one CPU while other CPUs* are within RCU read-side critical sections, then the* synchronize_rcu() is guaranteed to block until after all the other
715  loop :
716  file = fcheck_files(files, fd)
717  If file Then
722  If f_mode & mask Then file = NULL
724  Else if Not get_file_rcu_many(file, refs) Then Go to loop
727  _read_unlock() - marks the end of an RCU read-side critical section.* In most situations, rcu_read_unlock() is immune from deadlock.* However, in kernels built with CONFIG_RCU_BOOST, rcu_read_unlock()
729  Return file
Caller
NameDescribe
fget_many
fget
fget_raw
__fget_lightLightweight file lookup - no refcnt increment if fd table isn't shared.* You can use this instead of fget if you satisfy all of the following* conditions:* 1) You must call fput_light before exiting the syscall and returning control* to userspace (i