Function report |
Source Code:fs\locks.c |
Create Date:2022-07-28 20:25:34 |
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_setlk64(unsigned int fd, struct file *filp, unsigned int cmd, struct flock64 *flock)
Type:int
Parameter:
Type | Parameter | Name |
---|---|---|
unsigned int | fd | |
struct file * | filp | |
unsigned int | cmd | |
struct flock64 * | flock |
2579 | inode = locks_inode(filp) |
2594 | error = flock64_to_posix_lock(filp, file_lock, flock) |
2607 | Case cmd == F_OFD_SETLK |
2615 | Break |
2616 | Case cmd == F_OFD_SETLKW |
2621 | cmd = F_SETLKW64 |
2625 | Case cmd == F_SETLKW64 |
2626 | fl_flags |= A blocking lock |
2629 | error = do_lock_file_wait(filp, cmd, file_lock) |
2636 | If Not error && fl_type != F_UNLCK && Not (fl_flags & lock is "owned" by struct file ) Then |
2645 | spin_unlock( & file_lock) |
2653 | out : |
2655 | Return error |
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 |