Function report |
Source Code:fs\open.c |
Create Date:2022-07-28 20:00:57 |
Last Modify:2020-03-18 10:16:03 | Copyright©Brick |
home page | Tree |
Annotation kernel can get tool activity | Download SCCT | Chinese |
Name:do_dentry_open
Proto:static int do_dentry_open(struct file *f, struct inode *inode, int (*open)(struct inode *, struct file *))
Type:int
Parameter:
Type | Parameter | Name |
---|---|---|
struct file * | f | |
struct inode * | inode | |
int (* | open |
740 | static const struct file_operations empty_fops = {} |
744 | cached value = inode |
752 | f_op = empty_fops |
753 | Return 0 |
759 | Go to cleanup_file |
762 | If f_mode & le is open for writing && Not special_file(i_mode) Then |
764 | If Value for the false possibility is greater at compile time(error) Then Go to cleanup_file |
766 | error = __mnt_want_write(mnt) |
769 | Go to cleanup_file |
778 | f_op = Alas, no aliases. Too much hassle with bringing module.h everywhere (rmer ->i_op->default_file_ops ) |
781 | Go to cleanup_all |
784 | error = security_file_open(f) |
785 | If error Then Go to cleanup_all |
788 | error = break_lease(locks_inode(f), f_flags) |
789 | If error Then Go to cleanup_all |
796 | If open Then |
801 | f_mode |= FMODE_OPENED |
802 | If (f_mode & (le is open for reading | le is open for writing )) == le is open for reading Then i_readcount_inc(inode) |
804 | If f_mode & le is open for reading && Value is more likely to compile time(read || read_iter) Then f_mode |= Has read method(s) |
807 | If f_mode & le is open for writing && Value is more likely to compile time(write || write_iter) Then f_mode |= Has write method(s) |
829 | Return 0 |
831 | cleanup_all : |
832 | If WARN_ON_ONCE(error > 0) Then error = -EINVAL |
835 | If f_mode & Write access to underlying fs Then |
839 | cleanup_file : |
841 | mnt = NULL |
842 | dentry = NULL |
843 | cached value = NULL |
844 | Return error |
Name | Describe |
---|---|
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 |
Source code conversion tool public plug-in interface | X |
---|---|
Support c/c++/esqlc/java Oracle/Informix/Mysql Plug-in can realize: logical Report Code generation and batch code conversion |