Function report

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

Source Code:fs\notify\fsnotify.c Create Date:2022-07-28 20:16:01
Last Modify:2020-03-12 14:18:49 Copyright©Brick
home page Tree
Annotation kernel can get tool activityDownload SCCTChinese

Name:snotify_unmount_inodes - an sb is unmounting. handle any watched inodes.*@sb: superblock being unmounted.* Called during unmount with no locks held, so needs to be safe against* concurrent modifiers. We temporarily drop sb->s_inode_list_lock and CAN block.

Proto:static void fsnotify_unmount_inodes(struct super_block *sb)

Type:void

Parameter:

TypeParameterName
struct super_block *sb
40  struct inode * inode, * iput_inode = NULL
42  spin_lock( & s_inode_list_lock)
49  spin_lock( & _blocks, i_bytes, maybe i_size )
50  If Misc & ( 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 | Serves as both a mutex and completion notification) Then
51  spin_unlock( & _blocks, i_bytes, maybe i_size )
52  Continue
64  If Not atomic_read( & i_count) Then
65  spin_unlock( & _blocks, i_bytes, maybe i_size )
66  Continue
69  __iget(inode)
70  spin_unlock( & _blocks, i_bytes, maybe i_size )
71  spin_unlock( & s_inode_list_lock)
73  If iput_inode Then put an inode
77  This is the main call to fsnotify. The VFS calls into hook specific functions* in linux/fsnotify.h. Those functions then in turn call here. Here will call* out to all of the registered fsnotify_group. Those groups can then use the
79  snotify_inode_delete - and inode is being evicted from cache, clean up is needed
81  iput_inode = inode
83  cond_resched()
84  spin_lock( & s_inode_list_lock)
86  spin_unlock( & s_inode_list_lock)
88  If iput_inode Then put an inode
91  wait_var_event( & s_fsnotify_inode_refs, !atomic_long_read( & s_fsnotify_inode_refs))
Caller
NameDescribe
fsnotify_sb_delete