Function report

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

Source Code:fs\locks.c Create Date:2022-07-28 20:25:32
Last Modify:2020-03-12 14:18:49 Copyright©Brick
home page Tree
Annotation kernel can get tool activityDownload SCCTChinese

Name:posix_lock_to_flock

Proto:static int posix_lock_to_flock(struct flock *flock, struct file_lock *fl)

Type:int

Parameter:

TypeParameterName
struct flock *flock
struct file_lock *fl
2286  l_pid = locks_translate_pid - translate a file_lock's fl_pid number into a namespace*@fl: The file_lock who's fl_pid should be translated*@ns: The namespace into which the pid should be translated* Used to tranlate a fl_pid into a namespace virtual pid number
2292  If fl_start > OFFT_OFFSET_MAX Then Return -EOVERFLOW
2294  If fl_end != OFFSET_MAX && fl_end > OFFT_OFFSET_MAX Then Return -EOVERFLOW
2297  l_start = fl_start
2298  l_len = If fl_end == OFFSET_MAX Then 0 Else fl_end - fl_start + 1
2300  l_whence = 0
2301  l_type = fl_type
2302  Return 0
Caller
NameDescribe
fcntl_getlkReport the first existing lock that would conflict with l.* This implements the F_GETLK command of fcntl().