Function report |
Source Code:fs\locks.c |
Create Date:2022-07-28 20:25:30 |
Last Modify:2020-03-12 14:18:49 | Copyright©Brick |
home page | Tree |
Annotation kernel can get tool activity | Download SCCT | Chinese |
Name:generic_add_lease
Proto:static int generic_add_lease(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 |
1809 | inode = locks_inode(filp) |
1811 | is_deleg = fl_flags & NFSv4 delegation |
1816 | trace_generic_add_lease(inode, lease) |
1819 | ctx = locks_get_lock_context(inode, arg) |
1831 | If is_deleg && Not inode_trylock(inode) Then Return -EAGAIN |
1841 | percpu_down_read( & file_rwsem) |
1843 | time_out_leases(inode, & dispose) |
1844 | error = heck_conflicting_open - see if the given file points to an inode that has* an existing open that would conflict with the* desired lease |
1874 | If fl_flags & Lease is being broken Then Go to out |
1878 | If (my_fl != NULL) Then |
1883 | Go to out_setup |
1887 | If Not leases_enable Then Go to out |
1890 | locks_insert_lock_ctx(lease, & flc_lease) |
1900 | smp_mb() |
1901 | error = heck_conflicting_open - see if the given file points to an inode that has* an existing open that would conflict with the* desired lease |
1902 | If error Then |
1903 | locks_unlink_lock_ctx(lease) |
1904 | Go to out |
1907 | out_setup : |
1910 | out : |
1911 | spin_unlock( & flc_lock) |
1912 | percpu_up_read( & file_rwsem) |
1913 | locks_dispose_list( & dispose) |
1914 | If is_deleg Then inode_unlock(inode) |
1918 | Return error |
Name | Describe |
---|---|
generic_setlease | 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) |
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 |