Function report

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

Source Code:include\linux\iversion.h Create Date:2022-07-28 20:07:53
Last Modify:2020-03-12 14:18:49 Copyright©Brick
home page Tree
Annotation kernel can get tool activityDownload SCCTChinese

Name:de_query_iversion - read i_version for later use*@inode: inode from which i_version should be read* Read the inode i_version counter

Proto:static inline u64 inode_query_iversion(struct inode *inode)

Type:u64

Parameter:

TypeParameterName
struct inode *inode
309  cur = de_peek_iversion_raw - grab a "raw" iversion value*@inode: inode from which i_version should be read* Grab a "raw" inode->i_version value and return it. The i_version is not* flagged or converted in any way. This is mostly used to access a self-managed
310  cycle
312  If cur & I_VERSION_QUERIED Then
318  smp_mb()
319  Break
322  new = cur | I_VERSION_QUERIED
323  old = atomic64_cmpxchg( & i_version, cur, new)
324  If Value is more likely to compile time(old == cur) Then Break
326  cur = old
328  Return cur >> We borrow the lowest bit in the i_version to use as a flag to tell whether* it has been queried since we last incremented it. If it has, then we must* increment it on the next change. After that, we can clear the flag and
Caller
NameDescribe
ima_collect_measurementma_collect_measurement - collect file measurement* Calculate the file hash, if it doesn't already exist,* storing the measurement and i_version in the iint.* Must be called with iint->mutex held.* Return 0 on success, error code otherwise