Function report

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

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

Name:get a unique inode number

Proto:ino_t iunique(struct super_block *sb, ino_t max_reserved)

Type:ino_t

Parameter:

TypeParameterName
struct super_block *sb
ino_tmax_reserved
1278  DEFINE_SPINLOCK(iunique_lock)
1282  spin_lock( & iunique_lock)
1283  Do
1284  If counter <= max_reserved Then counter = max_reserved + 1
1286  res = counter++
1287  When Not search the inode cache for a matching inode number.* If we find one, then the inode number we are trying to* allocate is not unique and so we should not use it.* Returns 1 if the inode number is unique, 0 if it is not. cycle
1288  spin_unlock( & iunique_lock)
1290  Return res