函数逻辑报告

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

Source Code:fs\locks.c Create Date:2022-07-29 10:59:41
Last Modify:2020-03-12 14:18:49 Copyright©Brick
首页 函数Tree
注解内核,赢得工具下载SCCTEnglish

函数名称:Report the first existing lock that would conflict with l.* This implements the F_GETLK command of fcntl().

函数原型:int fcntl_getlk64(struct file *filp, unsigned int cmd, struct flock64 *flock)

返回类型:int

参数:

类型参数名称
struct file *filp
unsigned intcmd
struct flock64 *flock
2537  fl等于Allocate an empty lock structure.
2538  如果(fl == NULL)则返回:负ENOMEM
2541  error等于负EINVAL
2542  如果l_type不等于F_RDLCKl_type不等于F_WRLCK则转到:out
2545  error等于flock64_to_posix_lock(filp, fl, flock)
2546  如果error则转到:out
2549  如果cmd恒等于F_OFD_GETLK
2550  error等于负EINVAL
2551  如果l_pid不等于0则转到:out
2554  cmd等于using 'struct flock64'
2555  fl_flags或等于lock is "owned" by struct file
2556  fl_owner等于filp
2559  error等于vfs_test_lock - test file byte range lock*@filp: The file to test lock for*@fl: The lock to test; also used to hold result* Returns -ERRNO on failure. Indicates presence of conflicting lock by* setting conf->fl_type to something other than F_UNLCK.
2560  如果error则转到:out
2563  l_type等于fl_type
2564  如果fl_type不等于F_UNLCKposix_lock_to_flock64(flock, fl)
2567  out :
2568  Free a lock which is not in use.
2569  返回:error