Function report

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

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

Name:lock_lock_inode_wait - Apply a FLOCK-style lock to a file*@inode: inode of the file to apply to*@fl: The lock to be applied* Apply a FLOCK style lock request to an inode.

Proto:static int flock_lock_inode_wait(struct inode *inode, struct file_lock *fl)

Type:int

Parameter:

TypeParameterName
struct inode *inode
struct file_lock *fl
2134  might_sleep()
2135  cycle
2136  error = Try to create a FLOCK lock on filp
2137  If error != Special return value from posix_lock_file() and vfs_lock_file() for* asynchronous locking. Then Break
2139  error = wait_event_interruptible - sleep until a condition gets true*@wq_head: the waitqueue to wait on*@condition: a C expression for the event to wait for* The process is put to sleep (TASK_INTERRUPTIBLE) until the(fl_wait, ! The lock, that is blocking us )
2140  If error Then Break
2143  locks_delete_lock - stop waiting for a file lock*@waiter: the lock which was waiting* lockd/nfsd need to disconnect the lock while working on it.
2144  Return error
Caller
NameDescribe
locks_lock_inode_waitlocks_lock_inode_wait - Apply a lock to an inode*@inode: inode of the file to apply to*@fl: The lock to be applied* Apply a POSIX or FLOCK style lock request to an inode.