Function report

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

Source Code:fs\dcache.c Create Date:2022-07-28 20:07:26
Last Modify:2020-03-18 10:27:32 Copyright©Brick
home page Tree
Annotation kernel can get tool activityDownload SCCTChinese

Name:Try to do a lockless dput(), and return whether that was successful

Proto:static inline bool fast_dput(struct dentry *dentry)

Type:bool

Parameter:

TypeParameterName
struct dentry *dentry
727  If Value for the false possibility is greater at compile time( protected by d_lock & DCACHE_OP_DELETE) Then Return lockref_put_or_lock - decrements count unless count <= 1 before decrement*@lockref: pointer to lockref structure* Return: 1 if count updated successfully or 0 if count <= 1 and lock taken
734  ret = lockref_put_return - Decrement reference count if possible*@lockref: pointer to lockref structure* Decrement the reference count and return the new value.* If the lockref was dead or locked, return an error.
741  If Value for the false possibility is greater at compile time(ret < 0) Then
742  spin_lock( & d_lock)
743  If count > 1 Then
744  count--
745  spin_unlock( & d_lock)
746  Return true
748  Return false
754  If ret Then Return true
778  smp_rmb()
779  d_flags = READ_ONCE( protected by d_lock )
780  d_flags &= Recently used, don't discard. | DCACHE_LRU_LIST | DCACHE_DISCONNECTED
783  If d_flags == (Recently used, don't discard. | DCACHE_LRU_LIST) && Not d_unhashed - is dentry hashed*@dentry: entry to check* Returns true if the dentry passed is not currently hashed. Then Return true
791  spin_lock( & d_lock)
799  If count Then
800  spin_unlock( & d_lock)
801  Return true
809  count = 1
810  Return false
Caller
NameDescribe
dputdput - release a dentry*@dentry: dentry to release * Release a dentry. This will drop the usage count and if appropriate* call the dentry unlink method as well as removing it from the queues and* releasing its resources
dput_to_list