Function report |
Source Code:fs\locks.c |
Create Date:2022-07-28 20:25:33 |
Last Modify:2020-03-12 14:18:49 | Copyright©Brick |
home page | Tree |
Annotation kernel can get tool activity | Download SCCT | Chinese |
Name:Apply the lock described by l to an open file descriptor.* This implements both the F_SETLK and F_SETLKW commands of fcntl().
Proto:int fcntl_setlk(unsigned int fd, struct file *filp, unsigned int cmd, struct flock *flock)
Type:int
Parameter:
Type | Parameter | Name |
---|---|---|
unsigned int | fd | |
struct file * | filp | |
unsigned int | cmd | |
struct flock * | flock |
2448 | inode = locks_inode(filp) |
2476 | Case cmd == F_OFD_SETLK |
2484 | Break |
2485 | Case cmd == F_OFD_SETLKW |
2495 | fl_flags |= A blocking lock |
2498 | error = do_lock_file_wait(filp, cmd, file_lock) |
2505 | If Not error && fl_type != F_UNLCK && Not (fl_flags & lock is "owned" by struct file ) Then |
2514 | spin_unlock( & file_lock) |
2522 | out : |
2523 | trace_fcntl_setlk(inode, file_lock, error) |
2525 | Return error |
Name | Describe |
---|---|
do_compat_fcntl64 |
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 |