Function report

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

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

Name:validate_inodes - attempt to free all inodes on a superblock*@sb: superblock to operate on*@kill_dirty: flag to guide handling of dirty inodes* Attempts to free all inodes for a given superblock. If there were any

Proto:int invalidate_inodes(struct super_block *sb, bool kill_dirty)

Type:int

Parameter:

TypeParameterName
struct super_block *sb
boolkill_dirty
675  busy = 0
677  LIST_HEAD(dispose)
679  again :
680  spin_lock( & s_inode_list_lock)
682  spin_lock( & _blocks, i_bytes, maybe i_size )
683  If Misc & ( Serves as both a mutex and completion notification | Set when inode is about to be freed but still has dirty pages or buffers attached or the inode itself is still dirty | Must be set when calling write_inode_now() if i_count is zero) Then
684  spin_unlock( & _blocks, i_bytes, maybe i_size )
685  Continue
687  If Misc & I_DIRTY_ALL && Not kill_dirty Then
688  spin_unlock( & _blocks, i_bytes, maybe i_size )
689  busy = 1
690  Continue
692  If atomic_read( & i_count) Then
693  spin_unlock( & _blocks, i_bytes, maybe i_size )
694  busy = 1
695  Continue
698  Misc |= Set when inode is about to be freed but still has dirty pages or buffers attached or the inode itself is still dirty
699  inode_lru_list_del(inode)
700  spin_unlock( & _blocks, i_bytes, maybe i_size )
701  list_add - add a new entry*@new: new entry to be added*@head: list head to add it after* Insert a new entry after the specified head.* This is good for implementing stacks.
702  If need_resched() Then
703  spin_unlock( & s_inode_list_lock)
704  cond_resched()
705  dispose_list - dispose of the contents of a local list*@head: the head of the list to free* Dispose-list gets a local list with local inodes in it, so it doesn't* need to worry about list corruption and SMP locks.
706  Go to again
709  spin_unlock( & s_inode_list_lock)
711  dispose_list - dispose of the contents of a local list*@head: the head of the list to free* Dispose-list gets a local list with local inodes in it, so it doesn't* need to worry about list corruption and SMP locks.
713  Return busy
Caller
NameDescribe
__invalidate_device