函数逻辑报告

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

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

函数名称:alloc_file - allocate and initialize a 'struct file'*@path: the (dentry, vfsmount) pair for the new file*@flags: O_... flags with which the new file will be opened*@fop: the 'struct file_operations' for the new file

函数原型:static struct file *alloc_file(const struct path *path, int flags, const struct file_operations *fop)

返回类型:struct file

参数:

类型参数名称
const struct path *path
intflags
const struct file_operations *fop
193  file等于Find an unused file structure and return a pointer to it
194  如果是错误则返回:file
197  f_path等于path
198  cached value 等于 Where the name belongs to - NULL is * negative
199  f_mapping等于i_mapping
200  f_wb_err等于lemap_sample_wb_err - sample the current errseq_t to test for later errors*@mapping: mapping to be sampled* Writeback errors are always reported relative to a particular sample point* in the past. This function provides those sample points.
201  如果f_mode按位与le is open for reading 此条件成立可能性大(为编译器优化)(read || read_iter)则f_mode或等于Has read method(s)
204  如果f_mode按位与le is open for writing 此条件成立可能性大(为编译器优化)(write || write_iter)则f_mode或等于Has write method(s)
207  f_mode或等于FMODE_OPENED
208  f_op等于fop
209  如果f_mode按位与le is open for reading 按位或le is open for writing 的值的值恒等于le is open for reading i_readcount_inc( Where the name belongs to - NULL is * negative )
211  返回:file
调用者
名称描述
alloc_file_pseudo
alloc_file_clone