Function report

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

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

Name:Remove given block from the list of blocks with free entries

Proto:static int remove_free_dqentry(struct qtree_mem_dqinfo *info, char *buf, uint blk)

Type:int

Parameter:

TypeParameterName
struct qtree_mem_dqinfo *info
char *buf
uintblk
135  tmpbuf = getdqbuf(Space usable in block for quota data )
136  dh = buf
137  nextblk = le32_to_cpu(Number of next block with free entry )
138  prevblk = le32_to_cpu(Number of previous block with free entry )
141  If Not tmpbuf Then Return -ENOMEM
143  If nextblk Then
144  err = read_blk(info, nextblk, tmpbuf)
145  If err < 0 Then Go to out_buf
147  Number of previous block with free entry = Number of previous block with free entry
149  err = write_blk(info, nextblk, tmpbuf)
150  If err < 0 Then Go to out_buf
153  If prevblk Then
154  err = read_blk(info, prevblk, tmpbuf)
155  If err < 0 Then Go to out_buf
157  Number of next block with free entry = Number of next block with free entry
159  err = write_blk(info, prevblk, tmpbuf)
160  If err < 0 Then Go to out_buf
162  Else
163  First block with free entry = nextblk
164  mark_info_dirty(Sb quota is on , Quota type )
166  kfree(tmpbuf)
167  Number of next block with free entry = Number of previous block with free entry = cpu_to_le32(0)
169  If write_blk(info, blk, buf) < 0 Then quota_error(Sb quota is on , "Can't write block (%u) with free entries", blk)
172  Return 0
173  out_buf :
174  kfree(tmpbuf)
175  Return err
Caller
NameDescribe
find_free_dqentryFind space for dquot
free_dqentryFree dquot entry in data block