函数逻辑报告

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

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

函数名称:取索引节点ID

函数原型:ino_t iunique(struct super_block *sb, ino_t max_reserved)

返回类型:ino_t

参数:

类型参数名称
struct super_block *sb
ino_tmax_reserved
1278  DEFINE_SPINLOCK(iunique_lock)
1282  加自旋锁
1283  循环
1284  如果counter小于等于max_reservedcounter等于max_reserved加1
1286  res等于counter自加
1287  当非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.循环
1288  自旋锁解锁
1290  返回:res