Function report

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

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

Name:insert_inode_locked

Proto:int insert_inode_locked(struct inode *inode)

Type:int

Parameter:

TypeParameterName
struct inode *inode
1459  sb = i_sb
1460  ino = Stat data, not accessed from path walking
1461  head = inode_hashtable + hash(sb, ino)
1463  When 1 cycle
1464  struct inode * old = NULL
1465  spin_lock( & inode_hash_lock)
1467  If Stat data, not accessed from path walking != ino Then Continue
1469  If i_sb != sb Then Continue
1471  spin_lock( & _blocks, i_bytes, maybe i_size )
1474  Continue
1476  Break
1478  If Value is more likely to compile time(!old) Then
1479  spin_lock( & _blocks, i_bytes, maybe i_size )
1480  Misc |= Serves as both a mutex and completion notification | I_CREATING
1481  hlist_add_head( & i_hash, head)
1482  spin_unlock( & _blocks, i_bytes, maybe i_size )
1483  spin_unlock( & inode_hash_lock)
1484  Return 0
1486  If Value for the false possibility is greater at compile time(Misc & I_CREATING) Then
1487  spin_unlock( & _blocks, i_bytes, maybe i_size )
1488  spin_unlock( & inode_hash_lock)
1489  Return -EBUSY
1491  __iget(old)
1492  spin_unlock( & _blocks, i_bytes, maybe i_size )
1493  spin_unlock( & inode_hash_lock)
1494  writeback.h requires fs.h; it, too, is not included from here.
1495  If Value for the false possibility is greater at compile time(!inode_unhashed(old)) Then
1496  put an inode
1497  Return -EBUSY
1499  put an inode