Function report

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

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

Name:This operation can block, but only after everything is updated

Proto:void __dquot_free_space(struct inode *inode, qsize_t number, int flags)

Type:void

Parameter:

TypeParameterName
struct inode *inode
qsize_tnumber
intflags
1853  reserve = flags & DQUOT_SPACE_RESERVE
1855  If Not dquot_active(inode) Then
1856  If reserve Then
1860  Else
1863  Return
1866  dquots = i_dquot(inode)
1867  index = srcu_read_lock - register a new reader for an SRCU-protected structure
1868  spin_lock( & _blocks, i_bytes, maybe i_size )
1869  When cnt < MAXQUOTAS cycle
1872  w_type = Definitions for quota netlink interface
1873  If Not dquots[cnt] Then Continue
1875  spin_lock( & Lock protecting dq_dqb changes )
1876  wtype = info_bdq_free(dquots[cnt], number)
1877  If wtype != Definitions for quota netlink interface Then prepare_warning( & warn[cnt], dquots[cnt], wtype)
1879  If reserve Then dquot_free_reserved_space(dquots[cnt], number)
1881  Else dquot_decr_space(dquots[cnt], number)
1883  spin_unlock( & Lock protecting dq_dqb changes )
1885  If reserve Then de_reserved_space is managed internally by quota, and protected by* i_lock similar to i_blocks+i_bytes. -= number
1887  Else __inode_sub_bytes(inode, number)
1889  spin_unlock( & _blocks, i_bytes, maybe i_size )
1891  If reserve Then Go to out_unlock
1893  Dirtify all the dquots - this can block when journalling
1894  out_unlock :
1895  srcu_read_unlock - unregister a old reader from an SRCU-protected structure.*@ssp: srcu_struct in which to unregister the old reader.*@idx: return value from corresponding srcu_read_lock().* Exit an SRCU read-side critical section.
1896  Write warnings to the console and send warning messages over netlink.* Note that this function can call into tty and networking code.
Caller
NameDescribe
dquot_free_space_nodirty
dquot_release_reservation_block