函数逻辑报告

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

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

函数名称:posix_lock_inode_wait - Apply a POSIX-style lock to a file*@inode: inode of file to which lock request should be applied*@fl: The lock to be applied* Apply a POSIX style lock request to an inode.

函数原型:static int posix_lock_inode_wait(struct inode *inode, struct file_lock *fl)

返回类型:int

参数:

类型参数名称
struct inode *inode
struct file_lock *fl
1362  might_sleep()
1363  循环
1364  error等于posix_lock_inode(inode, fl, NULL)
1365  如果error不等于Special return value from posix_lock_file() and vfs_lock_file() for* asynchronous locking.退出
1367  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 )
1368  如果error退出
1371  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.
1372  返回:error
调用者
名称描述
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.