Function report

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

Source Code:fs\inode.c Create Date:2022-07-28 20:07:57
Last Modify:2020-03-18 19:19:59 Copyright©Brick
home page Tree
Annotation kernel can get tool activityDownload SCCTChinese

Name:lock_two_nondirectories - take two i_mutexes on non-directory objects* Lock any non-NULL argument that is not a directory.* Zero, one or two objects may be locked by this function.*@inode1: first inode to lock*@inode2: second inode to lock

Proto:void lock_two_nondirectories(struct inode *inode1, struct inode *inode2)

Type:void

Parameter:

TypeParameterName
struct inode *inode1
struct inode *inode2
1026  If inode1 > inode2 Then swap - swap values of @a and @b*@a: first value*@b: second value(inode1, inode2)
1029  If inode1 && Not S_ISDIR(i_mode) Then inode_lock(inode1)
1031  If inode2 && Not S_ISDIR(i_mode) && inode2 != inode1 Then inode_lock_nested(inode2, I_MUTEX_NONDIR2)