函数逻辑报告 |
Source Code:fs\open.c |
Create Date:2022-07-29 10:31:00 |
Last Modify:2020-03-18 10:16:03 | Copyright©Brick |
首页 | 函数Tree |
注解内核,赢得工具 | 下载SCCT | English |
函数名称:do_dentry_open
函数原型:static int do_dentry_open(struct file *f, struct inode *inode, int (*open)(struct inode *, struct file *))
返回类型:int
参数:
类型 | 参数 | 名称 |
---|---|---|
struct file * | f | |
struct inode * | inode | |
int (* | open |
740 | static const struct file_operations empty_fops = {} |
744 | cached value 等于inode |
750 | 如果此条件成立可能性小(为编译器优化)(f_flags & O_PATH)则 |
752 | f_op等于empty_fops |
753 | 返回:0 |
759 | 转到:cleanup_file |
762 | 如果f_mode按位与le is open for writing 且非special_file(i_mode)则 |
764 | 如果此条件成立可能性小(为编译器优化)(error)则转到:cleanup_file |
766 | error等于__mnt_want_write(mnt) |
767 | 如果此条件成立可能性小(为编译器优化)(error)则 |
768 | put_write_access(inode) |
769 | 转到:cleanup_file |
778 | f_op等于Alas, no aliases. Too much hassle with bringing module.h everywhere (rmer ->i_op->default_file_ops ) |
781 | 转到:cleanup_all |
784 | error等于security_file_open(f) |
785 | 如果error则转到:cleanup_all |
788 | error等于break_lease(locks_inode(f), f_flags) |
789 | 如果error则转到:cleanup_all |
796 | 如果open则 |
801 | f_mode或等于FMODE_OPENED |
802 | 如果f_mode按位与le is open for reading 按位或le is open for writing 的值的值恒等于le is open for reading 则i_readcount_inc(inode) |
804 | 如果f_mode按位与le is open for reading 且此条件成立可能性大(为编译器优化)(read || read_iter)则f_mode或等于Has read method(s) |
807 | 如果f_mode按位与le is open for writing 且此条件成立可能性大(为编译器优化)(write || write_iter)则f_mode或等于Has write method(s) |
829 | 返回:0 |
831 | cleanup_all : |
832 | 如果WARN_ON_ONCE(error > 0)则error等于负EINVAL |
835 | 如果f_mode按位与Write access to underlying fs 则 |
836 | put_write_access(inode) |
837 | __mnt_drop_write(mnt) |
839 | cleanup_file : |
841 | mnt = NULL |
842 | dentry = NULL |
843 | cached value = NULL |
844 | 返回:error |
名称 | 描述 |
---|---|
finish_open | sh_open - finish opening a file*@file: file pointer*@dentry: pointer to dentry*@open: open callback*@opened: state of open* This can be used to finish opening a file passed to i_op->atomic_open() |
vfs_open | vfs_open - open the file at the given path*@path: path to open*@file: newly allocated file with f_flag initialized*@cred: credentials to use |
open_with_fake_path |
源代码转换工具 开放的插件接口 | X |
---|---|
支持:c/c++/esqlc/java Oracle/Informix/Mysql 插件可实现:逻辑报告 代码生成和批量转换代码 |