Function report |
Source Code:fs\locks.c |
Create Date:2022-07-28 20:25:31 |
| Last Modify:2020-03-12 14:18:49 | Copyright©Brick |
| home page | Tree |
| Annotation kernel can get tool activity | Download SCCT | Chinese |
Name:generic_setlease - sets a lease on an open file*@filp: file pointer*@arg: type of lease to obtain*@flp: input - file_lock to use, output - file_lock inserted*@priv: private data for lm_setup (may be NULL if lm_setup* doesn't require it)* The (input)
Proto:int generic_setlease(struct file *filp, long arg, struct file_lock **flp, void **priv)
Type:int
Parameter:
| Type | Parameter | Name |
|---|---|---|
| struct file * | filp | |
| long | arg | |
| struct file_lock ** | flp | |
| void ** | priv |
| 1967 | inode = locks_inode(filp) |
| 1970 | If Not uid_eq(current_fsuid(), i_uid) && Not Check operation authority Then Return -EACCES |
| 1974 | error = security_file_lock(filp, arg) |
| 1980 | Return generic_delete_lease(filp, * priv) |
| 1983 | If Not lm_break Then |
| 1984 | WARN_ON_ONCE(1) |
| 1985 | Return -ENOLCK |
| 1988 | Return generic_add_lease(filp, arg, flp, priv) |
| 1989 | Default |
| 1990 | Return -EINVAL |
| Name | Describe |
|---|---|
| vfs_setlease | vfs_setlease - sets a lease on an open file*@filp: file pointer*@arg: type of lease to obtain*@lease: file_lock to use when adding a lease*@priv: private info for lm_setup when adding a lease (may be* NULL if lm_setup doesn't require it) |
| 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 |