函数逻辑报告

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

Source Code:fs\file.c Create Date:2022-07-29 10:38:45
Last Modify:2020-03-12 14:18:49 Copyright©Brick
首页 函数Tree
注解内核,赢得工具下载SCCTEnglish

函数名称:__fget

函数原型:static struct file *__fget(unsigned int fd, fmode_t mask, unsigned int refs)

返回类型:struct file

参数:

类型参数名称
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  如果file
722  如果f_mode按位与maskfile = NULL
724  否则如果非get_file_rcu_many(file, refs)则转到: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  返回:file
调用者
名称描述
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