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:Isolate the inode from the LRU in preparation for freeing it

Proto:static enum lru_status inode_lru_isolate(struct list_head *item, struct list_lru_one *lru, spinlock_t *lru_lock, void *arg)

Type:enum lru_status

Parameter:

TypeParameterName
struct list_head *item
struct list_lru_one *lru
spinlock_t *lru_lock
void *arg
734  freeable = arg
735  inode = container_of - cast a member of a structure out to the containing structure*@ptr: the pointer to the member.*@type: the type of the container struct this is embedded in.*@member: the name of the member within the struct.(item, structinode, i_lru)
741  If Not spin_trylock( & _blocks, i_bytes, maybe i_size ) Then Return m cannot be locked, skip
748  If atomic_read( & i_count) || Misc & ~Marks the inode as recently references on the LRU list Then
750  list_lru_isolate(lru, & de LRU list )
751  spin_unlock( & _blocks, i_bytes, maybe i_size )
752  this_cpu_dec(nr_unused)
753  Return m removed from list
757  If Misc & Marks the inode as recently references on the LRU list Then
758  Misc &= ~Marks the inode as recently references on the LRU list
759  spin_unlock( & _blocks, i_bytes, maybe i_size )
760  Return m referenced, give another pass
763  If inode_has_buffers(inode) || nrpages Then
764  __iget(inode)
765  spin_unlock( & _blocks, i_bytes, maybe i_size )
766  spin_unlock(lru_lock)
767  If remove_inode_buffers(inode) Then
774  If reclaim_state Then reclaimed_slab += reap
777  put an inode
778  spin_lock(lru_lock)
779  Return m not freeable. May drop the lockinternally, but has to return locked.
782  WARN_ON(Misc & Serves as both a mutex and completion notification)
783  Misc |= Set when inode is about to be freed but still has dirty pages or buffers attached or the inode itself is still dirty
784  list_lru_isolate_move(lru, & de LRU list , freeable)
785  spin_unlock( & _blocks, i_bytes, maybe i_size )
787  this_cpu_dec(nr_unused)
788  Return m removed from list