函数逻辑报告

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

Source Code:fs\quota\quota_tree.c Create Date:2022-07-29 11:09:41
Last Modify:2020-03-12 14:18:49 Copyright©Brick
首页 函数Tree
注解内核,赢得工具下载SCCTEnglish

函数名称:Remove given block from the list of blocks with free entries

函数原型:static int remove_free_dqentry(struct qtree_mem_dqinfo *info, char *buf, uint blk)

返回类型:int

参数:

类型参数名称
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  如果非tmpbuf则返回:负ENOMEM
143  如果nextblk
144  err等于read_blk(info, nextblk, tmpbuf)
145  如果err小于0则转到: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  如果err小于0则转到:out_buf
153  如果prevblk
154  err等于read_blk(info, prevblk, tmpbuf)
155  如果err小于0则转到: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  如果err小于0则转到:out_buf
162  否则
163  First block with free entry 等于nextblk
164  mark_info_dirty(Sb quota is on , Quota type )
166  释放内存
167  Number of next block with free entry 等于Number of previous block with free entry 等于cpu_to_le32(0)
169  如果write_blk(info, blk, buf)小于0则quota_error(Sb quota is on , "Can't write block (%u) with free entries", blk)
172  返回:0
173  out_buf :
174  释放内存
175  返回:err
调用者
名称描述
find_free_dqentryFind space for dquot
free_dqentryFree dquot entry in data block